bookmarks-search icon indicating copy to clipboard operation
bookmarks-search copied to clipboard

API request returns error

Open benj02 opened this issue 3 years ago • 1 comments

After logging in through OAuth, the request to https://api.twitter.com/2/users/me returns 403:

{
    "response": {
        "title": "Unsupported Authentication",
        "detail": "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].",
        "type": "https://api.twitter.com/2/problems/unsupported-authentication",
        "status": 403
    },
    "status": 403,
    "headers": {}
}

https://github.com/twitterdev/bookmarks-search/blob/main/src/App.js#L131

benj02 avatar Dec 17 '22 00:12 benj02

Ah, my app needed to be set up as a "Native app / Public client" in the dev console! Now it works. Might be good to note in the README

benj02 avatar Dec 17 '22 00:12 benj02