I am getting this error while trying to scrape followers data using the API. I have an authorized token key for Academic research. {“title”:“Unauthorized”,“type”:“about:blank”,“status”:401,“detail”:“Unauthorized”}. My labmate also tried it with her token and hit the same error on my system. But another researcher in our lab has been able to pull data with the same python code and a different key. (All of us have the same level of academic authorization)

Is there someone who can assist me with this error?

Which flowers endpoint are you calling and with what parameters? Is it a specific user that’s failing?

I’m having the same problem. I’m trying to use R to access the data. I followed the directions exactly from here:

Why is this not working?

The error is nearly always not having the Bearer token correctly loaded or having an extra space or something like a quotes in it. Also, this step in the guide:

In the below example, replace $BEARER_TOKEN with your token.
bearer_token ← Sys.getenv(“$BEARER_TOKEN”)

implies you have a system environment variable called BEARER_TOKEN if you replace the actual string there, it won’t work, for example, if your bearer token is AAAAAazzzzz this is not correct: Sys.getenv("AAAAAazzzzz"). This will look for an environment variable called AAAAAazzzzz not use the value AAAAAazzzzz. When hard coding the bearer token without using the system environment labels, it’s just the value:

bearer_token <- "AAAAAazzzzz"

Thank you so much!!! That solved the problem!