I am looking for a preview field to be added to one of my clients. Please let me know how I do it.
Below is the API call which I tried but no luck.
https://ads-api.twitter.com/5/accounts/18ce54d4x5t/tweet/preview?text=hello, world&as_user_id=756201191646691328
Also, I checked the endpoint, where twitter_id is required parameter and hence I have to call one more API - https://ads-api.twitter.com/5/accounts/2h34rt/scoped_timeline to get the twitter id.
Using twitter Id I checked the API but no luck. Here I am receiving an error stating " The credentials are no longer valid. Please, re-authenticate " (For valid user).

Thanks.

@pragati_gaikwad

First of all, the first API call you mentioned will no longer be available as of 2019-08-20 and we recommend using the new Tweet Previews endpoint instead.

so your request will be something like this:
https://ads-api.twitter.com/5/accounts/18ce54d4x5t/tweet_previews?tweet_ids=1122911801354510336,1102836745790316550&tweet_type=PUBLISHED

Here I am receiving an error stating " The credentials are no longer valid. Please, re-authenticate " (For valid user).

Did you re-authenticate with your App? I believe you can re-generate tokens from https://developer.twitter.com/en/apps (-> Details -> Keys and tokens) if you’re the only user who uses the App (single user access).

P.S.
We recently published Postman collection for the Ads API: https://github.com/twitterdev/postman-twitter-ads-api that has full coverage of all the Ads API endpoints we have at the moment.

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