Jump to content
UBot Underground

How to Use the Google API Commands in UBot Studio

Recommended Posts


Seth: We are going to start in the UBot Studio commands. Select the “GMail” and then drag the “connect to gmail” command over to your script. You’ll see, that you have a field for client ID and then you’ll have another for client secret.  So what are these and where do you get them?  Well let me walk you through the process. 


Seth: Pull up your google browser and type in “google developers console”.   If you don’t have any projects yet, it will either be blank or say create a project. You can click “create a project” or you can go to the top left of the search and click the drop down arrow,  then select “new project”. Name it whatever you wish. For the sake of this tutorial, we are going to name it “my bot”. You’ll click create and go back to the same location to make sure it’s selected. Once it loads, you’ll see a message that says you haven’t added any API’s to use yet. To get started, click “enable APIs and services”. Now Google has a lot of API services, but for the sake of the tutorial we will only be interested in a couple right now. You’re going to go to the search bar and  type in gmail. Gmail API, should be the first option that comes up from the search. You’ll click on it and then click the blue “enable button”. Cool, it’s now enabled. 


Seth: The next step is going to be to go over to credentials on the left side of the screen and you’re going to create and a OAuth 2.0 API. Click “create credentials”, then click OAuth client ID. Now in order to create the 0Auth client ID, you must first set a product name on the consent screen. So go ahead and click “configure consent screen” then make it external and click create. Label it whatever you choose. As for the email, there will be a  a drop-down and you just select whatever it gives you there. Then click save and continue.

Now we’re going to set up a scope.  So let’s click the button that says “add or remove scopes”. Here you will click the two two choices labeled “verify your email address” and “See your personal info, etc”.  Also, choose the fourth option down labeled “read, compose, send, etc.”. So basically all this is saying, is that you’re giving your bot permission to actually log into your email and do what you wanted to do in there. OK so for now that’s all we need. 


Seth: Next, you will get this pop up that says “verification required”.  It lets you know, that if you wanted to sell your bot, then you would have to go through this independent security review which can cost $15-$75,000.  Well good news for you!  As long as you’re not trying to sell your bot and you’re just using this for your own purposes, this is not a concern to you. So you can scroll to the bottom of this and click “save and continue”. Now we have optional info and I am not going to fill any of that out. I’m going to click “save and continue”. And now you are looking at the summary.  From here we can just click back to dashboard. 


Seth: Now you can go back to credentials.  You are going to click “create credentials”and select “OAuth client ID”. In the drop down menu showing  “application type” and choose “desktop app”. Go ahead and name it and click “create”. 

OK so we can see again that it’s bugging us to try and verify. The way this is worded is a little bit confusing. I had to dig around on Google before I could find out what it actually meant.  But what it’s saying is that you can only have a 100 different people login. So again, as long as this is just used for your own purposes, this is not going to be a limitation for you.


Seth: Okay so here, we have our “client ID” and our “client secret”. So now I can take this and copy it and go into my bio on UBot Studio and paste this information. Write these down and keep them somewhere safe.  However, something good to know, is that UBot Studio will actually save this information for you. 


Seth: One more thing to note. We only enabled the library for Gmail. But if you also want to use Google Sheets, then we’re going to have to enable the library for Google sheets as well. So go back to the project real quick and click “Okay”.  Then go back to library and type “sheets” in the search bar. Click on “Sheets” when it comes up and click “enable”. Sheets as it turns out, also depends on drive. Now back at the API library, type “Drive”.  Enable that. 


Seth: Now that you have those,  you want to set up your scopes again. So click “dashboard” again.  This takes you back to the home screen where you will choose “OAuth consent screen”. Here you are going to take another look at your scopes. Go ahead and  click “edit app”.  You already did all of this. So click “save and continue”. Then because you added Drive and Sheets, you should see those too.  Check off both once you’ve found them and then select “update”. Then once more click “save and continue” Now go back to dashboard and you should be all set up for both for Gmail and Google Sheets.  


Seth: There’s one last thing I wanna show you.  That is what happens when you actually run this. When you click “run”.  It’s going to load chrome for you. It’s going to ask you to choose an account. You’ll  select an account. Now it takes you to the scary screen. So all this is saying, is that you didn’t go through the crazy verification process, you didn’t give them a bunch of money and that you should only proceed if you know and trust the developer.  In this case, the developer is you!  As long as you know and trust yourself then you should be fine. So you’re going to go down to advanced, you’re going to click the link that says “go to my bot” then “allow” three more times.  And that’s it! You did it! 

  • Like 1
Link to post
Share on other sites
  • Create New...