Hi @mitchbuchanon ,
Sorry to hear you’re still having trouble! You have the right idea in terms of getting started. A 401 error usually mean there was a problem authenticating your request. From the Twitter docs, they specifically say that “A 401 status code means that there was a problem authenticating your request, such as an invalid consumer key or secret.”
My guess is maybe you either entered in the credentials incorrectly or in the wrong spot. You are correct in matching the environment variable names with what Twitter calls them: “API Key” from Twitter developer dashboard goes with consumer_key
environment variable and “API Secret Key” from Twitter developer dashboard goes with the consumer_secret
environment variable.
The values for the access_token
and token_secret
environment variables can be retrieved from the “Access Token and Secret” section of your project/app. See the screen shot for where to get this info.
Once all those are entered, you should be good to start making requests! The last thing to check would be that you have your environment saved AND selected. The red oval should have the “Twitter API v2” environment selected. If the environment is not selected and you go to make a request, it will give you that 401 error.
Lastly - you should actually be able to send a successful request if you ONLY use the bearer token. I just tried and was able to make requests with only my bearer token info entered. I would try both methods of sending a request.
If you’re still struggling to get a request working, perhaps some screenshots or a public workspace may help further debug your issues
Best of luck!