Whenever I try and request an access token, I get the following error:
oauth.signpost.exception.OAuthCommunicationException: Communication with the service provider failed: Service provider responded in error: 403 (Forbidden)
I'm using the Signpost Java library with this snippet to get the verifier and request the access token:
String verifier = uri.getQueryParameter(OAuth.OAUTH_VERIFIER);
LoveDroid app = (LoveDroid)getApplication();
CommonsHttpOAuthConsumer consumer = app.getOAuthConsumer();
It's for an Android app, the consumer used in the original request is persisted and re-used here (via getOAuthConsumer()) and I've checked the value of "verifier" to make sure it looks sane.
I don't know how accesible the logs are to you, but if I tell you who I'm authenticating as could you check to see why I'm un-authorised?
Message edited by Stuart Grimshaw 3 years ago
3 years ago
Well I can see you're using consumer key = "65g...25w".
Between 2010-08-03 23:30:00 and 23:59:59 you made:
7 calls to /oauth/request_token - 6 succeeded, and 1 failed
3 calls to /oauth/access_token - 1 succeeded, and 2 failed
All the failed calls were rejected with "403 Forbidden", and the X-Error-Detail-Header was set to "Not Authorized".
Here is the sequence of calls that led to a successful access token:
2010-08-03 23:49:47 - your app called /oauth/request_token and got back a request token "RXSWB" with verifier = "fdd...2d7" using callback="lovedroid://lovefilm"
2010-08-03 23:49:51 - you visited the authorisation page
2010-08-03 23:49:58 - you authorised the token to access your account
2010-08-03 23:50:08 - your app called /oauth/access_token and successfully obtained an access token "qyq...322" with secret "fU...aZ"
I'm afraid I can't provide any more insight than this without seeing the full HTTP requests you generated.
3 years ago
As is usual with these kind of things, I got it working not long after posting this message.
I used Brion Emde's example in his Brion Learns OAuth source, available on GitHub ...
Please sign in to add a post.
LOVEFiLM, the LOVEFiLM logo and all other LOVEFiLM product or service names are trade marks of LOVEFiLM International Ltd. © 2009 LOVEFiLM UK Limited. All Rights Reserved.