4

I have problems with the authentication, i am doing this steps:

1. First time I get the oauth_signature by using this site url with following details: http://7digital.github.io/oauth-reference-page/

url: https://api.7digital.com/1.2/oauth/requesttoken

consumer key: MY_KEY

consumer secret: MY_SECRET_KEY

nonce: 814629426

**timestamp: 1383291284

body encoding:** application/json

and them send request to get the oauth_token for the 7digital API: https://api.7digital.com/1.2/oauth/requesttoken?oauth_consumer_key=MY_KEY&oauth_nonce=184615245&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1383144733&oauth_version=1.0&oauth_signature=sJ%2B%2BPq2i9LfC1xGG1EHx2DrTBxg%3D

This request gets the oauth_token and the oauth_token_secret.

2. I need to authorize the oauth_token with the client key:

https://account.7digital.com/7dysvzdxkkmf/oauth/authorise?oauth_token=7EP6KGD The request responses a page to registration or login if i have a 7digital account.

3. I need to access token:

https://api.7digital.com/1.2/oauth/accesstoken?oauth_token=JXLDXZY&oauth_consumer_key=MY_KEY&oauth_signature=uJ8jUSre5%2Fe5qiJsA5jeN54143M%3D&oauth_timestamp=1383204749&oauth_nonce=558206579

But on step 3 i got error message: OAuth authentication error: Invalid signature.

What's wrong in my code?

skolima
  • 31,963
  • 27
  • 115
  • 151
Martin C
  • 395
  • 1
  • 7
  • 21
  • 4
    Are you signing the access token call with you request token secret as well as consumer secret? – Matt Gray Nov 01 '13 at 11:33
  • 1
    ya In step 3 i am exploring the query string to authorize the oauth_token(access) but it generate error message. – Martin C Nov 01 '13 at 11:39
  • 1
    Kajal, could you try signing with our OAuth reference application here: http://7digital.github.io/oauth-reference-page/ This will remove the possibility that the client you are using has any issues. As @MattGray says, in step 3 you should have the boxes "consumer key", "consumer secret", "token" and "token secret" filled in. – ChrisAnnODell Nov 01 '13 at 11:55
  • Have a look at the readme - there is a new step needed for running the sample/sdk tests. You will need to add some properties to the project gradle.properties file. There is a sample file (gradle.properties.sample) for reference. – Dhrupal Jan 20 '15 at 05:55

0 Answers0