What endpoint are you using?
free
What API version are you on?
free
Are you using a library or SDK? Which one?
no
What is the issue?
403 unauthorized
Steps to reproduce the issue
Step 1: go into ‘my first call’
Step 2: copy/paste credentials
What is the error message?
403: unauthorized
When did it start?
2024
What have you tried to troubleshoot?yes, gpt
Only a few API endpoints are available in the Free access tier.
Calling something else results in an error message of some sort.
Hello,
Can you please provide more details on which endpoint you are attempting to make a request to?
Or a link to the resource you are following where you see the my first call
steps?
I cannot posts any links, switched the first ‘/’ with ‘-’. Here is my first call:
curl “api.twitter.com-2/users/by/username/$USERNAME” -H “Authorization: Bearer $ACCESS_TOKEN”
Hello,
This is the following endpoint you are attempting to use:
- GET /2/users/by/username/:username
This endpoint is not available for the Free plan and is only available starting at the Basic plan.
Below are the endpoints available for the Free plan:
- GET /2/users/me
- POST /2/tweets
- DELETE /2/tweets/:id
Give the /2/users/me
endpoint a try and see if you still run into authentication errors.
I still get Authenticating with OAuth 2.0 Application-Only is forbidden for this endpoint. Supported authentication types are [OAuth 1.0a User Context, OAuth 2.0 User Context
below
url --request GET “https:// api. twitter. com/ 2/users/me?user.fields=username&expansions=most_recent_tweet_id” -H 'Authorization: Bearer
That endpoint only accepts OAuth 1.0a User Context and OAuth 2.0 User Context authentication types, so you will not be able to use your bearer token for authentication as you are in your curl request.