0

I am trying to request my own timeline tweets organic_metrics by adding them on the tweet.fields. By doing so, I retrieve them as expected.

The problem is that if I add the expansions referenced_tweets.id,referenced_tweets.id.author_id to the query I get a Field Authorization Error because (I presume) its attempting to retrieve the organic_metrics from the referenced tweets.

Here is an error example:

  {
    "resource_type": "tweet",
    "field": "organic_metrics.like_count",
    "parameter": "referenced_tweets.id",
    "resource_id": "1602665220689764353",
    "title": "Field Authorization Error",
    "section": "includes",
    "detail": "Sorry, you are not authorized to access 'organic_metrics.like_count' on the Tweet with referenced_tweets.id : [1602665220689764353].",
    "value": "1602665220689764353",
    "type": "https://api.twitter.com/2/problems/not-authorized-for-field"
  },

With this error the referenced_tweets do not come in the response and therefore I am unable to retrieve my own tweets organic_metrics and the referenced_tweets in the same response. I am forced to do x2 queries

I understand I can not access the organic_metrics on the referenced_tweets and I don't want to, I just need my own organic_metrics.

Is there any way to tell the API that I just want the organic_metrics of my tweets while at the same time retrieve the referenced_tweets without organic_metrics?

reymon359
  • 1,240
  • 2
  • 11
  • 34
  • if not paid account, you can't access `organic_metrics` even if your own tweet. https://stackoverflow.com/questions/67732581/twitter-v2-api-search-endpoint-field-authorization-error – Bench Vue Jan 11 '23 at 11:05
  • Thanks for answering @BenchVue. Actually I have already authenticate using OAuth 1.0a User Context authorization so I am able to retrieve the organic ones. What I am not able is to retrieve the organic and the referenced tweets at the same time – reymon359 Jan 13 '23 at 11:06

0 Answers0