Request query: cannot be longer than 128 characters error in Oauth tool for Ads API Version 1.0


#1

Trying to test GET /1/stats/accounts/:account_id . Where it says OAuth Signature Generator I choose my app and am redirected to the OAuth Tool page.

The Request query box has all the information in it that is needed e.g. entity_ids=43gk6&entity=CAMPAIGN&end_time=2016-02-01T17:00:00Z&granularity=HOUR&metric_groups=BILLING&placement=ALL_ON_TWITTER&start_time=2016-02-01T15:00:00Z

Clicking on Get Oauth Signature produces the following error

Error
Request query: cannot be longer than 128 characters but is currently 182 characters long.

and the cURL command is not properly complete and so none of it can be used. Is there something I have done wrong here or is the Oauth tool no longer working for the new ads api 1.0?


#2

You should do it in your side. Is not possible with the OauthSignature Generator.


#3

Probably better to use something like twurl instead of the web generator.


#4

can you give any pointers on what that query would look like in twurl? i have set up twurl using examples but am unsure how to do a call like this.


#5

I found an example in this post which I am trying to use so ignore the above request.

twurl -t -H ads-api.twitter.com ‘/1/stats/accounts/18ce54ayav9?entity=ACCOUNT&start_time=2016-05-13T00:00:00-03:00Z&end_time=2016-05-15T00:00:00-04:00Z&granularity=DAY&metric_groups=BILLING&placement=ALL_ON_TWITTER’


#6

Do you have a language in mind for doing your implementation in? We have SDKs listed available for several languages in this blog post: https://blog.twitter.com/2016/ads-api-libraries-supporting-version-1

The benefit of using an SDK is exactly to not have to implement things like OAuth which are troublesome and easy to have bugs.