Hi, I work for Directv and I’m tasked with integrating Twitter into an application. I’m using Nextjs and NextAuth authenticate my API calls. I have made serveral attempts to log in, while developing the integration, and was successful at this until yesterday. Now I get an access denied error. I contact support but have not heard back. Any help is appricated.
What exact endpoint are you calling and what’s the full error response from the API? Do you have a code sample?
General:
Request URL: https://twitter.com/i/api/2/oauth2/authorized
Request Method: GET
Status Code: 400
Remote Address: 104.244.42.193:443
Referrer Policy: strict-origin-when-cross-origin
Preview:
{error: “unauthorized_client”,…}
error: “unauthorized_client”
error_description: “Client application is not allowed for this operation.”
This forum won’t let me post anything like that… I don’t know what’s going on.
Here’s my code: GitHub - aadamsx/nextjs-social-integration
1 Like
On the Chrome network tab, there’s the 400:
General:
Request URL: “h_ttps://tw_itter.com/i/api/2/oauth2/authorize”
Request Method: GET
Status Code: 400
Remote Address:
Referrer Policy: strict-origin-when-cross-origin
Preview:
{error: “unauthorized_client”,…}
error: “unauthorized_client”
error_description: “Client application is not allowed for this operation.”
Hi AaronAd94363005](Profile - AaronAd94363005 - Twitter Developers, maybe my article can help you, check if you have set ‘Read and Write’ on your new app. Here is the link: How to get started with the Twitter API in 2022 | by Yassine TAHRI | Medium
Otherwise check if the Oauth2 had been activated, if it didn’t: instead of to activate only Oauth1, you should activate both Oauth1 and Oauth2, in hopes it will help you.
1 Like