Hello.
I have some problems.
Regarding Ads Api, I think there is a limit of 5 linked accounts. Please ask me about this.
- I would like to check the current number of integrations. Is it possible to do so using this API?
https://ads-api.twitter.com/11/accounts
But the data field was empty. If the ad account and the 3-legged-oauth linked account are the same, will it not be counted?
-
I am currently linking my test account with 3-legged-oauth, is it possible to unlink this from the 5 limit?
If possible, can it be done through the API? Or do you do it from the UI?
-
Regarding the meeting for increasing the upper limit of the number of linked accounts, is it possible to hold a demonstration in Japanese?
-
What should I prepare for the demonstration at the meeting?
Hello,
The https://ads-api.twitter.com/11/accounts does return the current number of accounts/integration that is associated with the App. Alternatively, you can view the accounts associated by running this command in the terminal nano ~/.twurlrc
FYI, twurlrc is a file which stores all your access tokens and which account is associated with it
In general, how it works is that the App performs API calls on behalf of an Ad account. As for your case, what we usually suggest clients to do is to:
- Have an App
- Create an account E.g.
DevAccount
- Authenticate the App to allow access to the Dev Account
- Once authenticated, the App acts on behalf of the Dev Account and it can query any data from the
DevAccount.
If you would like to query data for the other Ads account, you can do so by following the multi-user login method. This is a much easier and efficient way (i.e. Using just one account, you can access data from all the other Ads Account).
Take note to give the DevAccount Account Administrator/Ad Manager access in the other Ad Accounts.
Please also find below for answers to your questions:
First Question
- You can unlink by performing a
rm ~/.twurlrc Once this is done, you can re-authorise by performing this: twurl authorize --consumer-key key --consumer-secret secret
Second & Third Question
-
For this case, if you actually follow what I mentioned above, there usually shouldn’t be a need to increase the token limit since you already can access data of the other Ads Accounts using just one Ads Account. However, if you feel that each Ads Account needs to have their own token, you can still do so.
-
(Let me check if it can be done in Japanese) and also, for preparation, probably just prepare information on these:
- Overall intro to your company and business
- Selected user authentication method and flow
- Ad platform features and interface
- Usage of Ads API endpoints
Hope this helps.
Hello.
Thank you for replying.
I understood the first question
if you actually follow what I mentioned above, there usually shouldn’t be a need to increase the token limit since you already can access data of the other Ads Accounts using just one Ads Account.
I would like to proceed as in the answer to the second question.
When I executed the following API, I got an error like this
https://ads-api.twitter.com/10/accounts/{accountId}/tweet
User oooooooooooooo is not authorized to create tweets for user id ooo
I gave admin privileges from on the UI
https://ads-api.twitter.com/11/accounts/{accountId}/authenticated_user_access
I was told that I can check if I have the authority from the API below, so I executed it, but the authority is not reflected.
Are you having trouble with any of the steps? Please teach me.
Hello,
Could you share your Ads Account ID as well as the IDs mentioned here User oooooooooooooo is not authorized to create tweets for user id ooo
This information isn’t considered sensitive and cannot be used by unauthorized users in any way.
Hello,
I know. I will share.
https://ads-api.twitter.com/10/accounts/18ce55ip3zc/tweet?text=test&card_uri=card://1567709488278544384&nullcast=false&as_user_id=1482886522047107072
{
"errors": [
{
"code": "UNAUTHORIZED_ACCESS",
"message": "User 1526491691238055936 is not authorized to create tweets for user id 1482886522047107072"
}
],
"request": {
"params": {
"as_user_id": 1482886522047107072,
"text": "test",
"account_id": "18ce55ip3zc",
"nullcast": false,
"card_uri": "card://1567709488278544384"
}
}
}
Hello,
Can you try to remove the user @test99380596 from the Ads Account 18ce55ip3zc and re-add the user again? Let me know when it is done.
Hello,
Removed and added @test99380596 from ads Account 18ce55ip3zc. But it remained the same.
Hello,
If you refer to the documentation, it mentions that the as_user_id param needs to be the UserID of the advertiser that you are assisting to post the tweet for. As such, for your case, the as_user_id param should be this value 1526491691238055936 instead.
Currently, I believe that you are authenticated to the user 1526491691238055936.If you want to test if user 1482886522047107072 can create tweet on behalf of 18ce55ip3zc, what you can do is:
- Run
twurl accounts
- Set User
1482886522047107072 as the default user by running
twurl set default test99380596 consumer-key
- If User
1482886522047107072 is not found after running twurl accounts, run this:
twurl authorize --consumer-key <your key> --consumer-secret <your secret>
- Make sure that you are logged into the Twitter account of
test99380596 in twitter.com
More information on twurl can be found here
Once this is done, run twurl accounts again and check/verify that it states something like:

Just that it should be test99380596 and the consumer key below it. Once this is done, it means that any API call made, your App is performing action on behalf of test99380596
From here, you can go ahead and try to perform
https://ads-api.twitter.com/10/accounts/18ce55ip3zc/tweet?text=test&card_uri=card://1567709488278544384&nullcast=false&as_user_id=1526491691238055936
This should work. If it works, it means that you have successfully create a tweet using the test99380596 on behalf of Ad Account ID: 18ce55ip3zc
Hope this helps.
Hello,
If I proceed with the above procedure, will it be counted in the number of collaborations?
Also, I was able to make a card-style tweet using twurl, but if I send a request from a program or normal curl, is it necessary to issue a token with 3-legged-oauth?
Hello,
When you mention collaboration you mean taking up the token of the App?
Currently, can I check what are you intending to achieve? Do you want to perform API calls using the AppID 25312718 on behalf of test99380596 ? If yes, the account test99380596 will take up one token of the App.
If you send a request from program/normal curl, you will need to issue the token, similar to twurl. When you perform twurl authorize --consumer-key <your key> --consumer-secret <your secret>, it is the process of the App retrieving the user’s token to perform the necessary API calls.
Hello,
Thank you.
I tried it as you answered, but I can’t tweet as 1482886522047107072 and it looks like this.
Current account is 1482886522047107072.
{
"errors": [
{
"code": "UNAUTHORIZED_ACCESS",
"message": "User 1482886522047107072 is not authorized to create tweets for user id 1526491691238055936"
}
],
"request": {
"params": {
"as_user_id": 1526491691238055936,
"text": "test2",
"account_id": "18ce55ip3zc",
"nullcast": false,
"card_uri": "card://1567709488278544384"
}
}
}
{
"request": {
"params": {
"account_id": "18ce55ip3zc"
}
},
"data": {
"user_id": "1482886522047107072",
"permissions": [
"TWEET_COMPOSER",
"ACCOUNT_ADMIN"
]
}
}
Hello,
I just checked for this Ads Account 18ce55hide8 (belonging to test99380596 ) It seems like there is no funding_instrument added to the account yet. As such, it is not Active. Could you add a funding instrument for the Ads account first and re-try the API call?
In order to perform API call on behalf of another Ads Account, you will need to have an Active and working Ads Account.
Hello,
We know.
I apologize for not understanding.
Please let me confirm after sharing what you want to do again.
I would like to use the 18ce55ip3zc account to send card tweets from multiple handles.
If I want to post from 5 handles, do I have to issue 5 user access tokens? In that case, will 5 collaborations be counted?
there usually shouldn’t be a need to increase the token limit since you already can access data of the other Ads Accounts using just one Ads Account.
If the above is possible, please teach me how to do it.
Hello,
Yes, if that is the case, you will need to issue 5 tokens. The one that I shared regarding “Without a need to increase the token limit” will only work if you are using one handle to post card tweets on behalf of multiple ads account.
However, if you want to use multiple handles to post card tweets for 1 ads account, that will take up 5 user tokens.
Hello,
Sorry for the lack of time.
Last time, you said that you couldn’t tweet the card because you didn’t specify the funding instrument.
I raised funds and verified it, but the result was the same as here.
I would like you to tell me.
Hello,
Could you try regenerating the tokens of the App and re-authenticating with twurl again using twurl authorize --consumer-key <your key> --consumer-secret <your secret>
Also, could you share a screenshot of what you see in twurl accounts (Remove the token portion) for privacy reasons
Hello,
I tried to regenerate and exec twurl accounts

twurl -H ads-api.twitter.com -X POST “/10/accounts/18ce55ip3zc/tweet?text=test2&card_uri=card://1567709488278544384&nullcast=false&as_user_id=1526491691238055936”
{“errors”:[{“code”:“UNAUTHORIZED_ACCESS”,“message”:“User 1482886522047107072 is not authorized to create tweets for user id 1526491691238055936”}],“request”:{“params”:{“as_user_id”:1526491691238055936,“text”:“test2”,“account_id”:“18ce55ip3zc”,“nullcast”:false,“card_uri”:“card://1567709488278544384”}}}%
Hello,
As checked further, it seems like the account test99380596 has a rejected status. As such, the account can post tweets organically however, they cannot run ads/campaign.
Let me check with another team on the reason why it has a rejected status. We will get back to you as soon as they respond to us. Appreciate your patience here.
Hello,
Thank you for making sure
Regarding the reason for refusal, when is the specific prospect?
Hello,
I saw that the account @test99380596 is in “Private”. Can you make it public and try the API call again?