I’m trying to create a sandbox account with twurl using this empty POST request as directed by the documentation.
twurl -X POST ads-api-sandbox.twitter.com "/2/accounts/"
What am I doing wrong here?
Output
A complete HTML page containing:
<h1>Sorry, that page doesn’t exist!</h1>
Hi @abhishekkalia! Have you tried with version 3 of the API?
Yes, the same html file is returned.
Can you make GET or other requests? How about https://developer.twitter.com/en/docs/ads/campaign-management/api-reference/accounts#get-accounts ? Is this successful?
Yes GET works,
twurl -H "ads-api-sandbox.twitter.com" "/3/accounts"
gives the output
{"request":{"params":{}},"next_cursor":null,"data":[]}%
I see… then I don’t know, let’s wait and see what someone from Twitter Staff says.
Thank you.
Why would Twitter staff ignore this thread?
Hi @abhishekkalia! Maybe they just didn’t get to it. I would also say that their priority is the live environment, and then the sandbox… I’m sorry for this! Hang in there!
Hey @abhishekkalia
Looks like you’re missing the -H option prior to specifying the host. As an example, the correct usage here should be:
-H
twurl -X POST -H ads-api-sandbox.twitter.com "/3/accounts/"
Thanks!
Thank you! This fixed my problem.