[UPDATED 3/27/18] GCal Search

I’m not sure what isn’t right… Any help would be associated…

You do have this…right…I don’t see in your picture…if you have the “/callback” at the after “/oauth”

Then I would reset the “secret” on google API and add it back to ST settings…

Is your IDE on shard1 or shard2. I am on Shard2 and I get the same error.

Were you able to resolve this error ? I too am getting the same 403 error - looks just like yours here.

I do have the oauth/callback response_type=code in mine.

I’m on shard one. I have the call back that is in the city for shard one.

Still not working

We’re on the same shard… Will you post your url

I didn’t have to change anything. Just installed the app and followed directions on how to create and enable the calendar API…(see Readme)

I did that too…

this is what i have as my url

https://graph.api.smartthings.com/oauth/callback

At least I know someone far smarter than me has the exact same issue :wink:

Did you select the web application?

I think I did the wrong one the very first time and had to delete that and make a new one?

Just shotgunning here trying to help. I know its frustrating when it doesn’t work?

1 Like

Here’s what I have and it has been working:

Hey, Thanks guys… I did get it to work. I refreshed the Tokens in the ST app, I created new credentials in the Google API and recopied my url… clicked save… waited a few minutes and it was working…

It only took about 15 tries doing the exact same thing… lol

2 Likes

You sure it was 15? were there cartwheels or wand waving to go along with that?

3 Likes

I believe I have the set up the same as you all do …however I am still getting the 403 error.
I have recreated this – assured the ids are in the Smart App within the IDE correctly.
Any other ideas?

Refresh both tokens on the ST side and Google side and wait a few minutes before you make a request…

Way to bust the myth that doing the same thing over and over and expecting a different result is the definition of insanity… lol

4 Likes

Im in the Uk and also getting the 403 error, my ide url is https://graph-eu01-euwest1.api.smartthings.com/ so would https://graph-eu01-euwest1.api.smartthings.com/oauth/callback be correct to use?

I’ve got the same problem as Kev1, I’ve tried the callback Url he suggested , didnt seem to work.

I’ve also tried editing the code to change some of the Urls to use eu01 and that did not work (changes now reverted).

I’ve tried multiple versions of credentials all to no avail.

Any ideas anyone ? I would really like to try this SmartApp out if I can get it working.

Gary

I have worked for 2 days and still get the 403 error - however I am state side, on shard 1 (graph.api).

I have gone as far today as to DELETE everything - 2 Smart Apps and 2 DTH, rebuilt from blank slate, created a NEW project in google - I am yet to get the credentialing to work.

Folks,

A wild stab in the dark at an explanation for the behaviour of this app with regards to the 403 errors.

I’ve done some rudimentary tracing of the calls made by SmartThings when running various bits of the OAuth process and it looks like some of the 403 errors are due to the way the SmartThings App itself makes the redirect call to Google (this is the bit where you would see some kind of prompt to authorise the app to access your data in other apps and this is an assumption on my part as I never got past the 403 error).

Bearing in mind some people have had success after a random number of tries, I suspect there may be an issue at the Google end which occasionally lets this succeed as I cannot get it to work on iOS or Android with the latest version of the SmartThings App.

If I use Google’s OAuth Playground (https://developers.google.com/oauthplayground) to manually collect access tokens using the credentials created in the Google Developer Console (right back at the beginning of the process) and hard code these into the GCal Code everything works, I can access the calendars and the endpoints in the GCal code work (without any specific Shard being necessary, just the vanilla https://graph.api.smartthings.com as in the original code).

A dig on the internet seems to imply that Google no longer support web views and expect the app itself to utilise the browser located on the device itself (safari on ios etc.).

If some of the above is correct, I suspect there may be a minor rewrite in order, where the access tokens can be pasted into the GCal Search Smart App in the IDE, or into the SmartApp inside SmartThings the app on your iOs or Android device.

I haven’t looked up how long the orginal authorisation tokens are valid, but I also suspect the some people who have had success may also have had an old version of this app and have reused the their old tokens without realising (nor would they as this all happens in the code).

There may well be a much simpler explanation but this is very repeatable for me at the moment.

So once past the 403 errors, I can confirm that the app will work on the eu01 shard.

This method, whilst it works is not very elegant, there is a suggestion for a fix that works in a repeatable manner a few posts below (see https://community.smartthings.com/t/re-release-gcal-search/80042/64?u=garyspender

Gary

1 Like