When I try to generate new access token in postman for twitter auth2.0. I get this error when I click on generat new token: enter image description here
I have tried many ways to resolve it but am still stuck.
When I try to generate new access token in postman for twitter auth2.0. I get this error when I click on generat new token: enter image description here
I have tried many ways to resolve it but am still stuck.
This steps will get an Access Token
from Tweetter.
https://api.twitter.com/oauth2/token?grant_type=client_credentials
grant_type
is client_credentials
by query parameter
Select Authorization
tab
Select Basic Auth
combo box
Enter Username with API Key
Enter Password with API Secret
Those two value from Tweeter Developer Dashboard's project
https://developer.twitter.com/en/portal/dashboard
Finally, you can get the access token.
If you want to using as variable of Postman,
Add this code in Tests
section for calling V2 API.
var jsonData = JSON.parse(responseBody);
console.log(jsonData)
postman.setEnvironmentVariable("access-token", jsonData.access_token);
console.log(postman.getEnvironmentVariable("access-token"))