Using twurl with accounts you have oauth access to


#1

We have an app and it is set up with twurl. If we run

twurl accounts

then we see our twitter account as default. We also have access to other clients which we have set up using oauth and so have the oauth token and oauth secret. Using twurl I cannot access information for these other clients and for example when I try to run this

twurl -t -H ads-api.twitter.com '/1/stats/accounts/18ce54ayav9?entity=CAMPAIGN&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&campaign_ids=4phff'

the response is that “Account 18ce54ayav9 was not found” but it does exist and I can access it using normal curl calls. The issue is that in twurl the oauth token and oauth secret are not the ones we have been given to access these clients. How can I use the correct oauth tokens for these clients? I cannot set them up in twurl as I do not know the username and passwords as we just have oauth access.


#2

If you enter “twurl -T” it will bring up the manpage style explanation for Twurl, and that has a section “Changing your default profile” near the end which explains how to switch between different profiles. To set up the profile you either have to auth with Twurl (using the PIN method) or to manually add the keys to the .twurlrc file in the correct format.