These are the credentials I have obtained from the key generation page from api.telldus.com/keys (I have masked them here)
oauth_consumer_key/public key = XXXXXXXXXXXXXXXXX
oauth_consumer_secret/private key = YYYYYYYYYYYYYYYYY
With these credentials I am trying to get an access key by first calling /oauth/requestToken, then /oauth/authorize and finally /oauth/accessToken
Get temporary access token
Code: Select all
GET /oauth/requestToken?oauth_version=1.0&oauth_timestamp=1517586850&oauth_nonce=8177&oauth_signature_method=PLAINTEXT&oauth_consumer_key=XXXXXXXXXXXXXXXXX&oauth_signature=YYYYYYYYYYYYYYYYY%26 HTTP/1.1
Code: Select all
oauth_callback_confirmed=true&oauth_token=aaaaaaaaaaaaaaaaaa&oauth_token_secret=bbbbbbbbbbbbbbbbbbb&xoauth_token_ttl=3600
I then confirm the access by clicking the confirm button after opening this URL in my browser (I have added the access token obtained from the previous step):
Code: Select all
https://api.telldus.com/oauth/authorize?oauth_token=aaaaaaaaaaaaaaaaaa
Code: Select all
https://api.telldus.com/oauth/authorize?yes=1&oauthRand=12345678912a3456789d12b&oauth_token=aaaaaaaaaaaaaaaaaa
As the last step I call the accessToken URL by adding the oauth_verifier value in the URL and by adding the oauth_token_secret to the signature:
Code: Select all
POST /oauth/accessToken?oauth_version=1.0&oauth_timestamp=1517587447&oauth_nonce=14499&oauth_signature_method=PLAINTEXT&oauth_consumer_key=XXXXXXXXXXXXXXXXX&oauth_signature=YYYYYYYYYYYYYYYYY%26bbbbbbbbbbbbbbbbbbb&oauth_token=aaaaaaaaaaaaaaaaaa&oauth_verifier=12345678912a3456789d12b HTTP/1.1
Code: Select all
OAuth Verification Failed: Can't exchange request token "aaaaaaaaaaaaaaaaaa" for access token. No such token or not authorized%