Twitter api version 2 throws Client Forbidden error

Viewed 4663

When I try to query recent search endpoint of twitter /2/tweets/search/recent it throws an exception

{
    "client_id": "xxxxx",
    "required_enrollment": "Standard Basic",
    "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/portal/opt-in",
    "title": "Client Forbidden",
    "reason": "client-not-enrolled",
    "type": "https://api.twitter.com/2/problems/client-forbidden"
}

Additional informations

Authorization Oauth 1.0

Signature Method HMAC-SHA1

Also provide consumer key,secret,access token,token secret

why this happen? i don't get any useful information when i search with this error 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. Please help..

1 Answers

Just create a project to the standalone app in the Twitter dev portal. And also ensure you have v2 Acess tag under Projects and Apps => overview in front of your project name.

enter image description here

Related