Significant-Gravitas / AutoGPT

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
https://agpt.co
MIT License
166.09k stars 43.97k forks source link

Can AutoGPT post on Twitter also without Twitter-API /API-Key #2213

Closed Bubble007 closed 1 year ago

Bubble007 commented 1 year ago

⚠️ Search for existing issues first ⚠️

GPT-3 or GPT-4

Steps to reproduce 🕹

I made a little lovely AutoBot to work on a existing Twitter-account. I would like, if the bot could read and post on Twitter like human without API. But up to now he didn't get it. Is there a way?

Current behavior 😯

The Bot tried to send post with API. He couldn't and get an error. He has no API-Key, only the login-information for human user, but can't work with that.

Expected behavior 🤔

The bot can read and post on Twitter like human without API.

Your prompt 📝

# Paste your prompt here
sjnt1 commented 1 year ago

Why dont you just get yourself a twitter API? They have a free option and you get it instantly, atleast for now the free version can both read and send tweets.

AutoGPT can now send tweets using the command send_tweet. Update to latest stable version of AutoGPT, Get your API keys and tokens, smash them in your .env file and you should be able to post on twitter with your existing twitter account. Will not be long until they add other functions i think.

I have no idea its its possible to get autogpt to login like a human but i doubt it. It cant browse twitter profiles with the browse command

nostrodamus2023 commented 1 year ago

the twitter post feature seems to be not working. unless it only works with paid dev lvl 2 accounts.

Bubble007 commented 1 year ago

Hi sjnt1, thanks very much. I will try this :-) but I think, they will cancel the account very quick, lets see.

Von: sjnt1 @.> Gesendet: Montag, 17. April 2023 19:52 An: Significant-Gravitas/Auto-GPT @.> Cc: Bubble007 @.>; Author @.> Betreff: Re: [Significant-Gravitas/Auto-GPT] Can AutoGPT post on Twitter also without Twitter-API /API-Key (Issue #2213)

Why dont you just get yourself a twitter API? They have a free option and you get it instantly, atleast for now the free version can both read and send tweets.

AutoGPT can now send tweets using the command send_tweet. Update to latest stable version of AutoGPT, Get your API keys and tokens, smash them in your .env file and you should be able to post on twitter with your existing twitter account. Will not be long until they add other functions i think.

I have no idea its its possible to get autogpt to login like a human but i doubt it. It cant browse twitter profiles with the browse command

— Reply to this email directly, view it on GitHub https://github.com/Significant-Gravitas/Auto-GPT/issues/2213#issuecomment-1511827179 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AOWLGX4XLTJKIQKBFWE6GK3XBV7MXANCNFSM6AAAAAAXBO4KEY . You are receiving this because you authored the thread.Message ID: @.***>

sjnt1 commented 1 year ago

Np. No as long as it dont spam tweets its ok and you shouldnt get banned. If you get that problem you can always use this method: https://github.com/Significant-Gravitas/Auto-GPT/discussions/943#discussioncomment-5626007 and adjust the timer to whatever you want. Can be a bit tricky to set up.

Bubble007 commented 1 year ago

Thank you very mutch!

I have now registered an API access at Twitter :-)

But now I have a - to me a bit embarrassing - problem: I'm on the Developer Portal, but I don't get the Consumer Keys open, and I just can't figure out how to get them (to put them into the env.file).

Von: sjnt1 @.> Gesendet: Montag, 17. April 2023 23:29 An: Significant-Gravitas/Auto-GPT @.> Cc: Bubble007 @.>; Author @.> Betreff: Re: [Significant-Gravitas/Auto-GPT] Can AutoGPT post on Twitter also without Twitter-API /API-Key (Issue #2213)

Np. No as long as it dont spam tweets its ok and you shouldnt get banned. If you get that problem you can always use this method: #943 (reply in thread) https://github.com/Significant-Gravitas/Auto-GPT/discussions/943#discussioncomment-5626007 and adjust the timer to whatever you want. Can be a bit tricky to set up.

— Reply to this email directly, view it on GitHub https://github.com/Significant-Gravitas/Auto-GPT/issues/2213#issuecomment-1512109001 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AOWLGX2EARGVOT7RZI7GIFDXBWYYXANCNFSM6AAAAAAXBO4KEY . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AOWLGX24YYXQ7AJL5DXGY23XBWYYXA5CNFSM6AAAAAAXBO4KE2WGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTS2EDZ4S.gif Message ID: @. @.> >

Bubble007 commented 1 year ago

Sorry, I got it now (I mean the API-Keys)

Von: @. @.> Gesendet: Dienstag, 18. April 2023 13:02 An: 'Significant-Gravitas/Auto-GPT' @.***> Betreff: AW: [Significant-Gravitas/Auto-GPT] Can AutoGPT post on Twitter also without Twitter-API /API-Key (Issue #2213)

Thank you very mutch!

I have now registered an API access at Twitter :-)

But now I have a - to me a bit embarrassing - problem: I'm on the Developer Portal, but I don't get the Consumer Keys open, and I just can't figure out how to get them (to put them into the env.file).

Von: sjnt1 @.> Gesendet: Montag, 17. April 2023 23:29 An: Significant-Gravitas/Auto-GPT @.> Cc: Bubble007 @.>; Author @.> Betreff: Re: [Significant-Gravitas/Auto-GPT] Can AutoGPT post on Twitter also without Twitter-API /API-Key (Issue #2213)

Np. No as long as it dont spam tweets its ok and you shouldnt get banned. If you get that problem you can always use this method: #943 (reply in thread) https://github.com/Significant-Gravitas/Auto-GPT/discussions/943#discussioncomment-5626007 and adjust the timer to whatever you want. Can be a bit tricky to set up.

— Reply to this email directly, view it on GitHub https://github.com/Significant-Gravitas/Auto-GPT/issues/2213#issuecomment-1512109001 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AOWLGX2EARGVOT7RZI7GIFDXBWYYXANCNFSM6AAAAAAXBO4KEY . You are receiving this because you authored the thread.Message ID: @.***>

sjnt1 commented 1 year ago

Go to developer portal on twitter. Then you have to "create an app" in the developer portal. I think maybe you have to start a project to start an app, but i have an app without an project and that works for me.

Then go to your app and if you scan the page you shall se that there is an option to switch from "settings" to "keys and tokens" This is right under the name of your app at the top of the page.

You shall find your keys and tokens there. You might have to regenerate or generate keys but you do everything on that page.

Bubble007 commented 1 year ago

To make everything right, I now got the credentials from the Twitter api and also entered them in the .env file and also reinstalled the AutoGPT in the latest version.

But the bot does not get access to Twitter - error message:

"NEXT ACTION: COMMAND = send_tweet ARGUMENTS = {'text': 'The Holy Bot says: '} SYSTEM: Command send_tweet returned: Error: 'Forbidden' object has no attribute 'reason'".

sjnt1 commented 1 year ago

Do you have autogpt v 2.0.1? https://github.com/Significant-Gravitas/Auto-GPT/releases/tag/v0.2.1

That version did so that autogpt did not work for me until i installed git from here https://git-scm.com/ . Dont forget to restart your computer. I also had some issues with the env.env file but i think that was just me doing it the wrong way. If you follow instructions in readme you should be fine.

sjnt1 commented 1 year ago

Nvm you dont have the same issue i had so not sure that will fix your problem. I got the unknown command error .

You have some forbidden object stuff going on i see. From there its latin for me :)

Bubble007 commented 1 year ago

Thanks for the hints! What coul be wrong?

sjnt1 commented 1 year ago

I dont know man.

As long as you are talking about git and not github i dont think it matters from where you downloaded it.

Not stupid question, but not brackets.

yes it should be enough. I send tweets trough free api. Dont know enough to answer what auth (api key v1 or 2) is being used, havent read up on that enough yet.

I did a quick search on your last issue with the autogpt.json message, and the soloution?

Install git.

from here: https://git-scm.com/

and restart your computer.

Bubble007 commented 1 year ago

Thanks a lot. The issue with the autogpt.json message is gone with the new git installation. But Twitter is not to surrender :-)

sjnt1 commented 1 year ago

Have noe idea whats causing the twitter malfunction. Only thing i can think off is that maybe you mixed up the keys? I did that once and revoked all keys and put them in again. Make sure keys are keys and tokens are tokens, and that stuff gets put in the right place. What if you set the execute_local commands to True? I did that not sure if that had anything to do with it working

rankofootball commented 1 year ago

I had the same error and fixed that int the project settings -> user authentication settings:

App permissions: Read and write and Direct message Type of App: Web App, Automated App or Bot Fill in the rest of required info

Then regenerate the token.

Bubble007 commented 1 year ago

Thanks again to all!

I have also done everything well, but still have not come further. The bot tries hard, but still gets the error messages and ends up in an ensdlos loop.

This is what it looks like at the core :

2023-04-19 18:42:07,216 INFO NEXT ACTION: COMMAND = send_tweet ARGUMENTS = {'text': 'Be reminded of his overwhelming love with these remarkable religious quotes. "God loves each of us as if there were only one of us" - St. Augustine of Hippo "The best and most beautiful things in this world cannot be seen or even heard, but must be felt with the heart." - Helen Keller'} 2023-04-19 18:42:12,913 INFO -=-=-=-=-=-=-= COMMAND AUTHORIZED BY USER -=-=-=-=-=-=-=-= 2023-04-19 18:42:13,767 INFO SYSTEM: Command send_tweet returned: Error: 'Forbidden' object has no attribute 'reason'.

2023-04-19 18:45:25,101 INFO - Use the 'execute_shell' command to log out of the Twitter account.\n- Use the 'execute_shell' command to log back in to the Twitter account.\n- Use the 'send_tweet' command to post a quote on the Twitter account. 2023-04-19 18:45:25,617 INFO CRITICISM: I need to make sure that the Twitter account login credentials are correct. 2023-04-19 18:45:25,964 INFO NEXT ACTION: COMMAND = execute_shell ARGUMENTS = {'command_line': 'twurl accounts'} 2023-04-19 18:45:36,525 INFO -=-=-=-=-=-= COMMAND AUTHORIZED BY USER -=-=-=-=-=-=-= 2023-04-19 18:45:37,276 INFO SYSTEM: Command execute_shell returned: STDOUT: b'' STDERR: b'The command "twurl" is either misspelled or could not be found.\r\n' 2023-04-19 18:45:52,816 INFO THOUGHTS: The 'execute_shell' command returned an error. I will try again with the correct command.

2023-04-19 18:45:53,683 INFO - Use the 'execute_shell' command to log out of the Twitter account.\n- Use the 'execute_shell' command to log back in to the Twitter account.\n- Use the 'send_tweet' command to post a quote on the Twitter account. 2023-04-19 18:45:54,266 INFO CRITICISM: I need to make sure that the command I use is correct. 2023-04-19 18:45:54,618 INFO NEXT ACTION: COMMAND = execute_shell ARGUMENTS = {'command_line': 'twurl authorize --consumer-key --consumer-secret --access-token --access-token-secret '} 2023-04-19 18:46:14,723 INFO -=-=-=-=-=-= COMMAND AUTHORIZED BY USER -=-=-=-=-=-=-= 2023-04-19 18:46:15,420 INFO SYSTEM: Command execute_shell returned: STDOUT: b'' STDERR: b'Syntax error.\r\n'

Bubble007 commented 1 year ago

I Made a new issue for this problem to make it more clear for every one: Twitter - Command send_tweet returned: Error: 'Forbidden' object has no attribute 'reason'". #2588

Thanks every one here for their engagement up to this point :-)