I’m able to get the user context access token using the three-legged authentication. The format is like this: 12345678-asd98f798asdf79asdfa9sdfs9df7a9sdf7 (so, 8 digit numeric, followed by dash, followed by alphanumerics, like presented in User Access Tokens (3-legged OAuth flow) | Docs | Twitter Developer Platform).
The problem is I don’t know how to use this access token in forming request. When I tried to use this in place of application context access token (e.g. Header “Authentication: Bearer 12345678-asd98f798asdf79asdfa9sdfs9df7a9sdf7”) I got report that the access token is expired or invalid. I can do that correctly when using application context access token. I have the feeling that the way to use this user context access token is different, but I can’t find out what is the correct way. Can somebody help?
Thanks for reaching out here. Have you seen our documentation on creating bearer tokens yet?
This curl command should get you what you are looking for here:
curl -u '<API key>:<API secret key>' \
--data 'grant_type=client_credentials' \
'https://api.twitter.com/oauth2/token'
Hope this helps!
Jessica
system
Closed
#3
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.