# Any plans for node-red-node-twitter to use v2 Twitter API

**URL:** https://discourse.nodered.org/t/any-plans-for-node-red-node-twitter-to-use-v2-twitter-api/78449
**Category:** General
**Created:** [15 May 2023 19:23 UTC](https://discourse.nodered.org/t/any-plans-for-node-red-node-twitter-to-use-v2-twitter-api/78449 "2023-05-15T19:23:16Z")
**Posts on this page:** 10
**Page:** 1

<div class="post-metadata">

### Author: ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)
#### Post date: [15 May 2023 19:23 UTC](https://discourse.nodered.org/t/any-plans-for-node-red-node-twitter-to-use-v2-twitter-api/78449/1 "2023-05-15T19:23:16Z")

</div>

Up until 28th April I used node-red-node-twitter extensively with the Twitter API v1.1 within my House Alarm system to provide notifications and in conjunction with IFTTT and location on my mobile to activate and deactivate the alarm system. Unfortunately the Twitter API v1.1 which node-red-node-twitter utilises appears to have been deprecated and replaced with v2.0. Are there any plans to update node-red-node-twitter to use v2.0 of the API?

---

<div class="post-metadata">

### Author: ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)
#### Post date: [15 May 2023 20:04 UTC](https://discourse.nodered.org/t/any-plans-for-node-red-node-twitter-to-use-v2-twitter-api/78449/2 "2023-05-15T20:04:48Z")

</div>

No. Nothing is planned on my part. Given how restricted the API has become with no free access it isn't something that I'm strongly compelled to spend time on.

If anyone in the community is interested in working on it, you'll be welcome to.

---

<div class="post-metadata">

### Author: ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)
#### Post date: [15 May 2023 20:15 UTC](https://discourse.nodered.org/t/any-plans-for-node-red-node-twitter-to-use-v2-twitter-api/78449/3 "2023-05-15T20:15:55Z")

</div>

I would recommend switching to another API. Possibly Telegram or even Matrix/Element.

Personally, I would never have trusted Twitter with alarm data even before Musk screwed it up.

---

<div class="post-metadata">

### Author: ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)
#### Post date: [15 May 2023 20:20 UTC](https://discourse.nodered.org/t/any-plans-for-node-red-node-twitter-to-use-v2-twitter-api/78449/4 "2023-05-15T20:20:55Z")

</div>

There is a limited free access [X API Documentation | Docs | X Developer Platform](https://developer.twitter.com/en/docs/twitter-api).

## Access Levels

### **Free**

For write-only use cases and testing the Twitter API

- Low rate-limit access to v2 tweet posting and media upload endpoints
- 1,500 Tweets per month - posting limit at the app level
- 1 app ID
- Login with Twitter
- Cost: Free

**BUT not sure how write-only would allow one to test the Twitter API.**

Thanks, I guess I will have to find another way to get notifications. 🙁

---

<div class="post-metadata">

### Author: ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)
#### Post date: [15 May 2023 20:37 UTC](https://discourse.nodered.org/t/any-plans-for-node-red-node-twitter-to-use-v2-twitter-api/78449/6 "2023-05-15T20:37:37Z")

</div>

The system worked fine until April 28th. Thanks, I'll have a look at your suggestions.

---

<div class="post-metadata">

### Author: ![wooferguy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/wooferguy/32/75559_2.png) [@wooferguy](https://discourse.nodered.org/u/wooferguy)
#### Post date: [15 May 2023 21:47 UTC](https://discourse.nodered.org/t/any-plans-for-node-red-node-twitter-to-use-v2-twitter-api/78449/7 "2023-05-15T21:47:21Z")

</div>

There is an open PR for this node here:

[https://github.com/node-red/node-red-nodes/pull/954](https://github.com/node-red/node-red-nodes/pull/954)

If this were accepted, would it resolve your issue?

---

<div class="post-metadata">

### Author: ![chuank](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/chuank/32/1288_2.png) [@chuank](https://discourse.nodered.org/u/chuank)
#### Post date: [17 May 2023 04:00 UTC](https://discourse.nodered.org/t/any-plans-for-node-red-node-twitter-to-use-v2-twitter-api/78449/8 "2023-05-17T04:00:30Z")

</div>

@PdeJ have you looked at:

> **[GitHub - PLhery/node-twitter-api-v2: Strongly typed, full-featured, light,...](https://github.com/PLhery/node-twitter-api-v2)**
>
> Strongly typed, full-featured, light, versatile yet powerful Twitter API v1.1 and v2 client for Node.js. - GitHub - PLhery/node-twitter-api-v2: Strongly typed, full-featured, light, versatile yet p...

Provided you have access to the v2 API, you should be able to integrate this as a function node without issue. The v2-specific documentation is still valid and working (as of writing), but the future of Twitter v2 API support does not look bright at all...

On the node-red side you will need to [install the module](https://nodered.org/docs/user-guide/writing-functions#loading-additional-modules) before setting up your streams etc.

---

<div class="post-metadata">

### Author: ![PdeJ](https://avatars.discourse-cdn.com/v4/letter/p/c89c15/32.png) [@PdeJ](https://discourse.nodered.org/u/PdeJ)
#### Post date: [17 May 2023 16:27 UTC](https://discourse.nodered.org/t/any-plans-for-node-red-node-twitter-to-use-v2-twitter-api/78449/9 "2023-05-17T16:27:41Z")

</div>

Thanks Wooferguy and Chuank, but I will have to leave it to someone more competent to implement any changes to the Twitter node.

---

<div class="post-metadata">

### Author: ![Arfy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/arfy/32/41034_2.png) [@Arfy](https://discourse.nodered.org/u/Arfy)
#### Post date: [31 May 2023 07:21 UTC](https://discourse.nodered.org/t/any-plans-for-node-red-node-twitter-to-use-v2-twitter-api/78449/10 "2023-05-31T07:21:31Z")

</div>

Oups, I created the

> <https://github.com/node-red/node-red-nodes/issues/1000>
>
> Hi
> 
> Trying to send a tweet I get the error
> "You currently have access to Twit…ter API v2 endpoints and limited v1.1 endpoints only. If you need access to this endpoint, you may need a different access level. You can learn more here: https://developer.twitter.com/en/docs/twitter-api/getting-started/about-twitter-api#v2-access-leve"
> 
> According to
> https://twittercommunity.com/t/453-you-currently-have-essential-access-which-includes-access-to-twitter-api-v2-endpoints-only-if-you-need-access-to-this-endpoint-you-ll-need-to-apply-for-elevated-access-via-the-developer-portal-you-can-learn-more-here-https-developer-twitter-co/193001
> it seems that API v1.1 can only be used to send Media now
> 
> To tweet: api V2
> 
> But in code the 1.1 seems to be used to tweet (with or without media)
> node.twitterConfig.post("https://api.twitter.com/1.1/statuses/update.json",{},params).then(function(result) {
> in node-red-node-twitter/27-twitter.js

If I understand well

- to tweet text, now the V2 should be used
- to manage Media (alone without text tweet), V1.1 should be used

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [30 July 2023 07:21 UTC](https://discourse.nodered.org/t/any-plans-for-node-red-node-twitter-to-use-v2-twitter-api/78449/11 "2023-07-30T07:21:46Z")

</div>

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