What endpoint are you using?
2/tweets/sample/stream
What API version are you on?
version 2
Are you using a library or SDK? Which one?
No. Just curl
What is the issue?
Bearer token seems to lack privilege?
Steps to reproduce the issue
(see below)
What is the error message?
(see below)
When did it start?
Today. 2023-04-06
What have you tried to troubleshoot?
I’m going against the sample stream endpoint and seeing something similar issues here, here and here, but none of those have been for this endpoint. I’ve followed the steps on the Sampled stream quick start page to create a Project & App in the dev portal a couple of times now with similar results. I’m using the Bearer token that gets generated in place of the $APP_ACCESS_TOKEN variable in this curl request:
curl -X GET "https://api.twitter.com/2/tweets/sample/stream" \
-H "Authorization: Bearer $APP_ACCESS_TOKEN"
but it’s responded each time with this:
{
"client_id":"00000000",
"detail":"When authenticating requests to the Twitter API v2 endpoints, you must use keys and tokens from a Twitter developer App that is attached to a Project. You can create a project via the developer portal.",
"registration_url":"https://developer.twitter.com/en/docs/projects/overview",
"title":"Client Forbidden",
"required_enrollment":"Appropriate Level of API Access",
"reason":"client-not-enrolled",
"type":"https://api.twitter.com/2/problems/client-forbidden"
}
I wondered about the "required_enrollment":"Appropriate Level of API Access" and "reason":"client-not-enrolled". I looked over the docs several times and as far as I can see, I have followed the steps they outline. I have the free tier account, meaning I can only do one project/app at a time. I haven’t seen anything that looks like that should be a problem, however. The only other thing I can see on the portal is that User authentication settings are not set up. I don’t see anything in the docs that looks like that should be problem, though. I looked at that page and I don’t have a Callback URI or Website URL to specify.