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.

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.nbviewer.jupyter.org