Twitter Ads API V1 - Unable to access Sandbox API's CTA Preroll Endpoint

ads
api

#1

While testing the Sandbox API as part of the Twitter Ads API v1, we found that we were unable to access the CTA Preroll endpoint (https://dev.twitter.com/ads/reference/post/accounts/%3Aaccount_id/preroll_call_to_action)

Please see the TWURLs and the traces below. We tried accessing both v0 and v1 of the API.

First we tried hitting the /1/ endpoint and received a “ROUTE_NOT_FOUND” error code with an error message of “The requested resource could not be found”:

607 % twurl -t -H "https://ads-api-sandbox.twitter.com/" "/1/accounts/gq0w3i/preroll_call_to_action" -d "line_item_id=cmab" -d "call_to_action=VISIT_SITE" -d "call_to_action_url=https%3A%2F%2Fapp.hyfn8.com%2F"
opening connection to ads-api-sandbox.twitter.com...
opened
<- "POST /1/accounts/gq0w3i/preroll_call_to_action HTTP/1.1\r\nAccept: */*\r\nUser-Agent: OAuth gem v0.4.7\r\nContent-Type: application/x-www-form-urlencoded\r\nAuthorization: OAuth oauth_consumer_key=\"EC2gKPePluhEBh49u26nA\", oauth_nonce=\"k9M0q5psYyi7LLAU0i7OWb6xaQMoeDnR7CfufK0dU\", oauth_signature=\"mLLJQ%2B7LxDExr9TC4sOikE7YhhY%3D\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1458250973\", oauth_token=\"3073813016-2Gxuh05I9karD6Vpj60XQVsPeZ85oXQ8pDhJsYL\", oauth_version=\"1.0\"\r\nConnection: close\r\nHost: ads-api-sandbox.twitter.com\r\nContent-Length: 101\r\n\r\n"
<- "line_item_id=cmab&call_to_action=VISIT_SITE&call_to_action_url=https%253A%252F%252Fapp.hyfn8.com%252F"
-> "HTTP/1.1 404 Not Found\r\n"
-> "connection: close\r\n"
-> "content-disposition: attachment; filename=json.json\r\n"
-> "content-length: 117\r\n"
-> "content-type: application/json;charset=utf-8\r\n"
-> "date: Thu, 17 Mar 2016 21:42:54 GMT\r\n"
-> "server: tsa_a\r\n"
-> "set-cookie: guest_id=v1%3A145825097495414275; Domain=.twitter.com; Path=/; Expires=Sat, 17-Mar-2018 21:42:54 UTC\r\n"
-> "strict-transport-security: max-age=631138519\r\n"
-> "x-access-level: read-write-directmessages\r\n"
-> "x-api-version: 0.0\r\n"
-> "x-connection-hash: 789a74be45e357e019095c6b3d585f0b\r\n"
-> "x-content-type-options: nosniff\r\n"
-> "x-frame-options: SAMEORIGIN\r\n"
-> "x-response-time: 17\r\n"
-> "x-runtime: 4.04E-4\r\n"
-> "x-transaction: 89f6764c28962f66\r\n"
-> "x-tsa-request-body-time: 582\r\n"
-> "x-xss-protection: 1; mode=block\r\n"
-> "\r\n"
reading 117 bytes...
-> ""
-> "{\"errors\":[{\"code\":\"ROUTE_NOT_FOUND\",\"message\":\"The requested resource could not be found\"}],\"request\":{\"params\":{}}}"
{"errors":[{"code":"ROUTE_NOT_FOUND","message":"The requested resource could not be found"}],"request":{"params":{}}}read 117 bytes
Conn close

Then we tried hitting the /0/ endpoint and we were left with the same “ROUTE_NOT_FOUND” code with an error message of “The requested resource could not be found”:

twurl -t -H "https://ads-api-sandbox.twitter.com/" "/0/accounts/gq0w3i/preroll_call_to_action" -d "line_item_id=cmab" -d "call_to_action=VISIT_SITE" -d "call_to_action_url=https%3A%2F%2Fapp.hyfn8.com%2F"
opening connection to ads-api-sandbox.twitter.com...
opened
<- "POST /0/accounts/gq0w3i/preroll_call_to_action HTTP/1.1\r\nAccept: */*\r\nUser-Agent: OAuth gem v0.4.7\r\nContent-Type: application/x-www-form-urlencoded\r\nAuthorization: OAuth oauth_consumer_key=\"EC2gKPePluhEBh49u26nA\", oauth_nonce=\"BdcPG3ihvtIjX7cvJB517tvfkVSMBsZnsShPSzONbs\", oauth_signature=\"A8DIJD47N1G5QD8KnV8M0UY%2BxIY%3D\", oauth_signature_method=\"HMAC-SHA1\", oauth_timestamp=\"1458251068\", oauth_token=\"3073813016-2Gxuh05I9karD6Vpj60XQVsPeZ85oXQ8pDhJsYL\", oauth_version=\"1.0\"\r\nConnection: close\r\nHost: ads-api-sandbox.twitter.com\r\nContent-Length: 101\r\n\r\n"
<- "line_item_id=cmab&call_to_action=VISIT_SITE&call_to_action_url=https%253A%252F%252Fapp.hyfn8.com%252F"
-> "HTTP/1.1 404 Not Found\r\n"
-> "connection: close\r\n"
-> "content-disposition: attachment; filename=json.json\r\n"
-> "content-length: 117\r\n"
-> "content-type: application/json;charset=utf-8\r\n"
-> "date: Thu, 17 Mar 2016 21:44:29 GMT\r\n"
-> "server: tsa_a\r\n"
-> "set-cookie: guest_id=v1%3A145825106908687217; Domain=.twitter.com; Path=/; Expires=Sat, 17-Mar-2018 21:44:29 UTC\r\n"
-> "strict-transport-security: max-age=631138519\r\n"
-> "x-access-level: read-write-directmessages\r\n"
-> "x-connection-hash: f525d8d0679c4ee8e8035d4da15e8f24\r\n"
-> "x-content-type-options: nosniff\r\n"
-> "x-frame-options: SAMEORIGIN\r\n"
-> "x-response-time: 13\r\n"
-> "x-runtime: 4.05E-4\r\n"
-> "x-transaction: 2872c82ece6a12b3\r\n"
-> "x-tsa-request-body-time: 72\r\n"
-> "x-xss-protection: 1; mode=block\r\n"
-> "\r\n"
reading 117 bytes...
-> ""
-> "{\"errors\":[{\"code\":\"ROUTE_NOT_FOUND\",\"message\":\"The requested resource could not be found\"}],\"request\":{\"params\":{}}}"
{"errors":[{"code":"ROUTE_NOT_FOUND","message":"The requested resource could not be found"}],"request":{"params":{}}}read 117 bytes
Conn close

#2

Hi, this was answered in POST /preroll_call_to_action ROUTE_NOT_FOUND

Thanks,

John


#3