Most likely, the number that you get after the authorization step is the oauth_verifier string, which must be sent along with the REQUEST token to get the ACCESS token.
This is a mandatory part of the oAuth 1.0a implementation (which, in my opinion, is the most common version used now, because 2.0 is still a draft, and there are not many libraries that implement it).
I assume that you are not sending the callback URL to the provider, and it does not know where to redirect the user after authorization. When the provider does not know the callback URL, it cannot redirect the user back to your (consumer) application. In this case, the specification says that it should print the verifier string on the screen so that you (the user) can take it manually and transfer it to your (consumer) application, and thus create a request for ACCESS TOKEN.
If you provide a callback URL (in your first request for a REQUEST token), then most likely you will not get a screen with this number, but instead you (the user) will be redirected to the callback URL with it automatically.
eg. if your callback url is: http://myapp.com/oauth/callback , the provider will redirect the user to your callback url with the correct values ββin the query string.
redirect: http://myapp.com/oauth/callback?oauth_token=xxxx&oauth_verifier=yyyy
Then your application should take the verifier string and add it as a parameter to the request for ACCESS TOKEN (as you did earlier with other parameters like nonce, timestamp, oauth_token, etc.)
In response to this last request (with oauth_verifier included) you should get ACCESS TOKEN.
Here is a good explanation of the oauth_verifier line and why it was entered into the protocol: http://hueniverse.com/2009/04/explaining-the-oauth-session-fixation-attack/
middlehut
source share