Google Drive API Qn:

schmutly

Super Moderator
Staff member
So, Im trying to use the Google Drive API 0Auth2
After reading a few tutorials and setting up my APP to test in
Postman I got back the List of files in my G Drive--> https://prnt.sc/uTy5YwPx9_1Y
It wasn't easy lol.
In postman, you have to ass a callback URI (default to local so it opens a browser so I, the tester, can login with my Gmail account to give the APP authorization to allow it...THEN you can click to bearer token for the access token, then allowed to click GET to be able to get a response.
This is all wonderful and all šŸ¤£....in Postman. How to accomplish this in ESB :/?
I have these filled in like postman --> https://prnt.sc/wewNO0nUZNjA So I am just checking (as I am going to bed and only just got this working in Postman so haven't checked in the script side...but is the callback URI in there or we add it from the REST API actions on the left?
I am trying this Google drive as I think in an ESB app, be a good idea for clients can upload their files ect to the Drive so it's a good API to test.

Any thought?
Thanks, Thomas, going to bed though will be hard as damn RAAF helicopters flying around from the base in my area, are very annoying lol.
Night,
Cheers
Robbie.
 

TigerSoftware

Administrator
Staff member
authenticate.png


Select the account record and click Authenticate. Callback url should be localhost and the port number you set.


Thomas
 
Last edited:

schmutly

Super Moderator
Staff member
Morning,
just got up. Didn't see that, thanks.
I pressed it and it said this--> (deleted image but it is missing scope and according to Google docs is needed to show customer what it needs access to )
I noticed in Postman there's a place for the scope too-> https://prnt.sc/Jg5vlvEn2Gxa
Is Scope & callback meant to be in here->https://prnt.sc/zHXehGFZ07RB or i will set them up in
the script? Sorry, I haven't gone that far yet...so I will probably answer my own question when i go
check it in a minute as I literally just got up.
Thanks for that..will play with this today. Looks good. :)
 
Last edited:

techedge

Well-known member
One of the issue I was having also was with the scope when I was testing QuickBooks API. Since there was no place for it in the account form, I included it in the script under query parameter. However, I got error during authentication so I was not able to authenticate successfully.

Thomas - where is the right place to indicate where the score URL and call back URL should be inserted ?
 

TigerSoftware

Administrator
Staff member
Weird, looks like the authorization scope isn't showing up in the Oauth2 window. The property is there but it isn't showing up on the window.

Will be in the next update. You will probably have to right click, select customization, and drag it onto the window.


Thomas
 

TigerSoftware

Administrator
Staff member
One of the issue I was having also was with the scope when I was testing QuickBooks API. Since there was no place for it in the account form, I included it in the script under query parameter. However, I got error during authentication so I was not able to authenticate successfully.

Thomas - where is the right place to indicate where the score URL and call back URL should be inserted ?

There is no call back url. It will look at localhost for a response. So you need to add "localhost" as the redirect for your Quickbooks/Google "app" when you set it up on their site. If you add a different url then the software program won't be able to access the response and get the tokens required to make the rest calls.


Thomas
 
Last edited:

schmutly

Super Moderator
Staff member
So you need to add "localhost" as the redirect for your Quickbooks/Google "app" when you set it up on their site.
I remember reading that but forgot. Will go to the app in my console to add it as was easy in Postman.
Right-click ->customization->drag scope to the window..isn't there, I did try that after I noticed it missing in case of that but do you mean in the next update will we need to drag it on? It isn't there now. Anyhow..going to check my URI ... I think I added some other link.
Cheers

EDIT:
From the downloaded JSON file ( https://prnt.sc/N8v2dJAO4up8 ) the localhost seems to be in there. As its, a desktop type
in the google drive API dashboard ( https://prnt.sc/08cJ93tWjmJt )
 
Last edited:
Top