Hello there,
I’ve been trying to migrate to the v2 endpoint to post tweets and I’m struggling with an authorization error. Just for context, my bot has been tweeting through this app for a year now, a couple thousands tweets and it hasn’t failed since the initial set up was completed.
I would like to know if anyone could confirm what needs to change when migrating?
I’ve read this page and it says the authentication process doesn’t change when migrating. And regarding what does need to change I’ve applied and checked and tested a few times to no avail already.
Here’s the error data:
{
title: 'Unauthorized',
type: 'about:blank',
status: 401,
detail: 'Unauthorized'
}
I must be missing something… I’ll keep investigating but any heeeelpppppppp!! would be greatly appreciated.
What exact endpoint are you calling and using what implementation / library? Also how are you authenticating (Bearer token is wrong, that’s App only - you need either Access Token & Secret with Read& Write access or Oauth2 PKCE token with the correct scopes OAuth 2.0 Authorization Code Flow with PKCE | Docs | Twitter Developer Platform )
Thank you!
I was using the raw Twitter API v1.1. It was a challenge of mine last year to talk to Twitter API without a library.
I use Access Token & Secret with Read & Write.
I’m not sure what was wrong but now I’ve tried with npm’s twitter-api-v2 and it’s working as expected.
1 Like