DEV Community

Discussion on: Many bot accounts using 1 Twitter Developer account

 
randomjkbn profile image
random

In developer portal -> Projects & Apps -> Standalone Apps -> {Your App name} -> keys & tokens -> Consumer keys(API Key & Secret)

If u head over there, u will get consumer_key and consumer_secret. Check the first diagram in this blog post for reference.

res.cloudinary.com/practicaldev/im...

Thread Thread
 
vigneshkraj profile image
vigneshkraj

Thanks again for your reply. But here I'm having an issue, let me explain.
I have an account called "A", which I got approved for Twitter API access keys(all 4). Above method is done(oAuth enabled,callback URL given all fine) for account "A".

Now as per your prev comment guidance, I went to dev portal -> creating std alone apps for my another account "B"(given same in Website URL in account A dev account). Hence I got consumer keys & bearer key & access keys were generated as per this forum. So finally i got all the 4 keys.
Now while I use it in program, it calls always account A only, not account B.

That's my prblem. Thanks again.

Thread Thread
 
randomjkbn profile image
random

In the python program, access_token and access_token_secret should be what you obtain after running the nodejs program and visiting localhost:3456 (while logged into account B).

consumer_key and consumer_secret should be the keys from the standalone app from developer account A. Did u do it like this?

Thread Thread
 
vigneshkraj profile image
vigneshkraj • Edited

Wow.. Lovely.. superb... Thanks a ton your immediate response as always.
And yes, I missed this point "visiting localhost:3456 (while logged into account B)." meaning, I was logged in from Acct A.

So , by using one proper API dev Approved account, can enable oAuth for one more account B like the above steps.
Hope can tag only one account called B or more than 1 like C, D also ? Thanks again.

Thread Thread
 
randomjkbn profile image
random

Nice! Theoretically speaking it should work as long as u have the access_token and access_token_secret of whichever account B,C or D.

It's an interesting question. I haven't tried it out for more than 1 bot account though in a single standalone app since I've never worked on such a use case.

You could try it out and if u do find something interesting, do let us know!

Thread Thread
 
vigneshkraj profile image
vigneshkraj

Yes...... !! It's working actually. As per our case, Account A is our primary.. on that i have created standalone account B, API keys will be provided in this app itself and have generated the tokens by using above forum(autorize.js). Like the same way, i have created one more account called C. Have tried the same way. It is got generated & tried the sample in my code. It works !!!

Let me check further and I will update u if i find anything unusual... Thanks a ton.....!! Good day

Thread Thread
 
randomjkbn profile image
random

Nice!