I am currently trying to implement the 3-legged authorization with the twitter api.
The problem is that I am trying to resolve my request token to an access token (Step 3) and it returns the error “Error processing your OAuth request: Invalid oauth_verifier parameter”. Did I understand correctly that the api consumer key and secret stays the same as in the token request while the access token and access token secret changes to the earlier acquired tokens (in Step 1) and that you have to add an additional header parameter called oauth_verifier which matches the one transmitted by the callback url?
I also noticed that the oauth_verifier that I receive by the callback url is a bit shorter than the example in the twitter api documentation.
If I got you correctly this could be a possible request, correct?
curl -X POST \
-H 'Authorization: OAuth oauth_consumer_key="consumer key of my app",oauth_token="token received in step one",oauth_signature_method="HMAC-SHA1",oauth_timestamp="1546895811",oauth_nonce="ExhAaxJllQr",oauth_version="1.0",oauth_signature="signature"' \
-H 'oauth_verifier: verifier which was received by my callback url'
and also by following the implementation in Scala (see above). However, I am still stuck with the same error message. Could someone have a look over my code and maybe tell me, where my approach was wrong? I preprared a Jupyter notebook.
EDIT: Nevermind, I found a way to implement the signin in Python.