how to get rate limit for the "like tweet" endpoint? #277
Answered
by
alkihis
MarufRien1
asked this question in
Q&A
-
I am trying to get the rate limit for the "like tweet" endpoint. import { TwitterApi } from 'twitter-api-v2'
import { TwitterApiRateLimitPlugin } from '@twitter-api-v2/plugin-rate-limit'
const rateLimitPlugin = new TwitterApiRateLimitPlugin()
const client = new TwitterApi(yourKeys, { plugins: [rateLimitPlugin] })
// ...make requests...
await client.v2.like('1112', '2220');
// ...
const currentRateLimitForMe = await rateLimitPlugin.v2.getRateLimit('users/1234/likes') // 123 is my twitter id
console.log(currentRateLimitForMe) // result : undefined I didn't find anything in the docs that would help me. I think I am doing something wrong here ---> I have tried : users/:loggedUserId/likes, users/likes, users/loggedUserId/likes |
Beta Was this translation helpful? Give feedback.
Answered by
alkihis
May 3, 2022
Replies: 1 comment 4 replies
-
Hi, URL is the same as available in twitter doc: users/:id/likes |
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
MarufRien1
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi, URL is the same as available in twitter doc: users/:id/likes
See https://developer.twitter.com/en/docs/twitter-api/tweets/likes/api-reference/post-users-id-likes