[Google Calendar API] URI missmach

[Google Calendar API] URI missmach

  
Forge Component
(5)
Published on 1 Jun by Luís Rolo
5 votes
Published on 1 Jun by Luís Rolo
Hello, i m new to outsystems and app development in general.I m trying Google Calendar API,however, i can not set it properly. Followed the instructions,but then i get error then i try to open calendar panel.

The redirect URI in the request, https://tomaitis888.outsystemscloud.com/GoogleCalendar/OAuth2Callback.aspx, does not match the ones authorized for the OAuth client. Visit https://console.developers.google.com/apis/credentials/oauthclient/1010315391410-8tv88otktk2bo2hft4v658gi14dtqnpm.apps.googleusercontent.com?project=1010315391410 to update the authorized redirect URIs.

In the setup guide it's show what URI should look like this : https://<hostname>/GoogleCalendar/OAuthCalendar.aspx
so i set myne:https://tomaitis888.outsystemscloud.com/GoogleCalendar/OAuthCalendar.aspx
Did not set Authorized JavaScript origins  , because manual don't said so.
Thx in advance,
Regards,
Tomas

I fixed this problem now google authorizes, however and i m redirected to page{
Internal Error
An internal error occurred and was logged.
Please try again later or contact the administration team.

Sorry for any inconvenience.

Press here to continue
}
Any thoughts?
Regards,
Tomas
Tomas Žilys wrote:
I fixed this problem now google authorizes, however and i m redirected to page{
Internal Error
An internal error occurred and was logged.
Please try again later or contact the administration team.

Sorry for any inconvenience.

Press here to continue
}
Any thoughts?
Regards,
Tomas
 
Hi Tomas.

I've checked the application and in fact there is an issue on the oAuthGetToken action, because the credentials are hardcoded (I forgot to change that one, sorry). I already fixed this issue and I will publish a new version in a few minutes.

Best regards,
Luís Rolo
Luís Rolo wrote:
Tomas Žilys wrote:
I fixed this problem now google authorizes, however and i m redirected to page{
Internal Error
An internal error occurred and was logged.
Please try again later or contact the administration team.

Sorry for any inconvenience.

Press here to continue
}
Any thoughts?
Regards,
Tomas
 
Hi Tomas.

I've checked the application and in fact there is an issue on the oAuthGetToken action, because the credentials are hardcoded (I forgot to change that one, sorry). I already fixed this issue and I will publish a new version in a few minutes.

Best regards,
Luís Rolo
 Hi Luis,
I still got the same problem, i created credentials, got client id and secret, but uri dont work for me.In how to it's shown as this ii. Example: https://<hostname>/GoogleCalendar/OAuthCalendar.aspx , so myne should be
 https://tomaitis888.outsystemscloud.com/GoogleCalendar/OAuthCalendar.aspx   ?
Tomas Žilys wrote:
Luís Rolo wrote:
Tomas Žilys wrote:
I fixed this problem now google authorizes, however and i m redirected to page{
Internal Error
An internal error occurred and was logged.
Please try again later or contact the administration team.

Sorry for any inconvenience.

Press here to continue
}
Any thoughts?
Regards,
Tomas
 
Hi Tomas.

I've checked the application and in fact there is an issue on the oAuthGetToken action, because the credentials are hardcoded (I forgot to change that one, sorry). I already fixed this issue and I will publish a new version in a few minutes.

Best regards,
Luís Rolo
 Hi Luis,
I still got the same problem, i created credentials, got client id and secret, but uri dont work for me.In how to it's shown as this ii. Example: https://<hostname>/GoogleCalendar/OAuthCalendar.aspx , so myne should be
 https://tomaitis888.outsystemscloud.com/GoogleCalendar/OAuthCalendar.aspx   ?
 Hello Tomas, 

Thank you for your reply.

In order to enable the API, you have to make sure that you create the credentials on the Google API manager as "Web Application" and configure a redirect URI to your site or application like on the example bellow.

Step 1



Then you can do the Configuration on the Google Calendar application like this.

Step 2



Also, the redirect page (OAuthCalendar.aspx) should have the "Anonymous" role checked.
That should be enough to work.

However, after this set up,  you are still facing some issue, please access to Service Center (on Monitoring) to see what is the error.

Let me know if you have further questions.

Regards,
Luís Rolo
Hello Luís,
Thank you for your reply.

I solved my issue. The problem was that in description example shown as https://<hostname>/GoogleCalendar/OAuthCalendar.aspx   i think it should be https://<hostname>/GoogleCalendar/OAuth2Calendar.aspx, atleast this solved my problem.
Thanks again.
Tomas