Oauth2 authentication for twitter using HTTP Node

Hi,

I am trying to setup HTTP Node to communicate with Twitter API v2. Specifically the search endpoint (https://api.twitter.com/2/tweets/search/all) needs Oauth2 authentication.

Refer doc here.

I am not sure what to fill in for the following params in the credentials page:
Client ID,
CLient Secret
Scope
Auth URI Param
Authentication

Pasted below is a screenshot of the page.

Can any one help me with it please?

Thank you.

You can find the Twitter OAuth2 credentials here where you can see the values that get used by the n8n Twitter node.

The information about where to get Client ID and secret you can find in our documentation where it is described step by step.

1 Like

Thank you @jan !

Thank you for pointing me to the github link. I had not thought about looking at the repo.

Btw, in the documentation link you sent I couldn’t find reference to the client ID. Is it the API key and secret?

Hey @ronykris!

Took a quick look at the Twitter documentation and it seems like you don’t need to worry about the OAuth. You can generate a Bearer Token and use the Header Auth in n8n.

I tried the header auth approach with Twitter APi V2 but it returns an error,
HTTP code
rejected.

Just FYI the “here” link leads to the Twist api, not Twitter. api V1

I have a question, are we certain the Authorization URL’s and Access Token URL are the same for V1 and V2 ?

No matter what I try I can’t manage to connect the account last step of the Auth 2

Any idea ? I don’t see how to add this missing request token;

Connecting account same credentials but on Auth V1 Works just fine tho
the Auth V1 UI node has a **Request Token URL *** https://api.twitter.com/oauth/request_token
that the Auth v2 UI does not, not sure if it’s related to not being able to retrieve the request token ?

But it’s not possible to use the V2 API endpoints with Auth v1 from what I understand.

1 Like

A year later… this is still a issue!

any updates?

Hi @jfcaringi, [email protected] introduced a new version of the Twitter node also introduced support for Twitter OAuth2.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.