bitbucket post request using oauth token and token secret error 400 BAD REQUEST

Issue #11461 closed
Naveen Mora
created an issue

Sending request like this

"POST /2.0/repositories/xxxxxx/naveentest1 HTTP/1.1\r\nAuthorization: OAuth oauth_consumer_key=\"DHFaYu29cLXWxgwUpP\", oauth_nonce=\"B5jrHhkZ4uHOL8d8ePLqNVN6kROyoKzAvlqeX2Zc\", oauth_signature=\"1IqhI%2BzQDmHpCl6yDpG39vhsagE%3D\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1434465831\", oauth_token=\"xxxxxxxxx\", oauth_version=\"1.0\"\r\nContent-Type: application/json\r\nConnection: close\r\nHost: api.bitbucket.org\r\nContent-Length: 68\r\n\r\n"
<- "scm=git&is_private=true&fork_policy=no_public_forks&name=naveenTest1"
-> "HTTP/1.1 400 BAD REQUEST\r\n"
-> "Server: nginx/1.6.2\r\n"
-> "Date: Tue, 16 Jun 2015 14:43:54 GMT\r\n"
-> "Content-Type: text/plain\r\n"
-> "Content-Length: 11\r\n"
-> "Connection: close\r\n"
-> "X-Served-By: app22\r\n"
-> "X-Render-Time: 0.0200200080872\r\n"
-> "Content-Language: en\r\n"
-> "X-Static-Version: dfb7cd0bb732\r\n"
-> "Vary: Authorization, Accept-Language, Cookie\r\n"
-> "X-Version: 14a726bbc643\r\n"
-> "ETag: \"825644f747baab2c00e420dbbc39e4b3\"\r\n"
-> "X-Request-Count: 300\r\n"
-> "X-Frame-Options: SAMEORIGIN\r\n"
-> "X-OAuth-Scopes: wiki, account, repository:admin, repository, issue:write, pullrequest:write, team, webhook, pullrequest, snippet, snippet:write, repository:write, team:write, account:write, issue, email\r\n"
-> "X-Accepted-OAuth-Scopes: repository:admin\r\n"
-> "\r\n"
reading 11 bytes...
-> "Bad Request"
read 11 bytes
Conn close
#<HTTParty::Response:0x7fa5c593f220 parsed_response="Bad Request", @response=#  <Net::HTTPBadRequest 400 BAD REQUEST readbody=true>, @headers={"server"=>["nginx/1.6.2"], "date"=>["Tue, 16 Jun 2015 14:43:54 GMT"], "content-type"=>["text/plain"], "content-length"=>["11"], "connection"=>["close"], "x-served-by"=>["app22"], "x-render-time"=>["0.0200200080872"], "content-language"=>["en"], "x-static-version"=>["dfb7cd0bb732"], "vary"=>["Authorization, Accept-Language, Cookie"], "x-version"=>["14a726bbc643"], "etag"=>["\"825644f747baab2c00e420dbbc39e4b3\""], "x-request-count"=>["300"], "x-frame-options"=>["SAMEORIGIN"], "x-oauth-scopes"=>["wiki, account, repository:admin, repository, issue:write, pullrequest:write, team, webhook, pullrequest, snippet, snippet:write, repository:write, team:write, account:write, issue, email"], "x-accepted-oauth-scopes"=>["repository:admin"]}>

Comments (7)

  1. Erik van Zijst staff

    Sorry for not digging into this sooner. I'm afraid this issue slipped through the cracks.

    If this is still an issue and to verify the validity of your signature, I need the full URL (therefore I need the username path segment). We also have to make sure you did not use the none before making this call (re-running an OAuth 1 is not possible).

    If you are not comfortable sharing that information, then let's move this to support (this issue tracker is not intended for individual support issues, but rather to track feature requests and bugs) by emailing us at support@bitbucket.org

  2. Marcus Bertrand staff

    As there has been no activity on this issue for some time, we're closing it. If you're still having this issue, please come to support.atlassian.com with the requested information and we can help you privately.

    Cheers,
    Marcus

  3. Log in to comment