Cannot get a long lived access token from Live! API - says no such token or not authorized

Moderator: Telldus

Post Reply
Stacker
Posts: 1
Joined: Fri Mar 17, 2023 9:45 am

Cannot get a long lived access token from Live! API - says no such token or not authorized

Post by Stacker »

It might be something wrong with the Live! API service or maybe it´s just me.

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
As the answer from this step I get:

Code: Select all

oauth_callback_confirmed=true&oauth_token=aaaaaaaaaaaaaaaaaa&oauth_token_secret=bbbbbbbbbbbbbbbbbbb&xoauth_token_ttl=3600
Authorize
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
As the anser for this step I get:

Code: Select all

https://api.telldus.com/oauth/authorize?yes=1&oauthRand=12345678912a3456789d12b&oauth_token=aaaaaaaaaaaaaaaaaa
Get long lived access token
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
As the anser from this step I get:

Code: Select all

OAuth Verification Failed: Can't exchange request token "aaaaaaaaaaaaaaaaaa" for access token. No such token or not authorized%
So why am I getting this answer? I have provided the correct oauth_token to the request so I know it is correct, I I have also authorized the access in step 2. So is it me or is it Live! API?
Post Reply