401 error when trying to set up Google Calendar component

I am trying to access Google Calendar using your AdvGCal component.

I have created a Google account and downloaded the ID, Secret, API Key and Application Name.

I am using these in the TMS test project, but I am receiving an Error 401.

I attach 2 images showing what I am doing ...


Hi,

We are not aware of any issues to access Google Calendar with AdvGCalendar.
When exactly during the authentication process is the error displayed?
Can you please provide a screenshot of the error message?

Thanks Bart.

The error is pretty simple:

"Authorisation Error
Error 401: invalid_client
The OAuth client was not found."

Please note, as per the prior message, that I have set up OAuth on this Google account, and provided the "Secret" and AppKey in the INC file as per the demo.

Aside from these 2 variables (API Key and Secret) are there other variables I need to set up in AdvCalendar? For example Google also provide Project ID, Project Name, and dozens of other IDs and Keys.

Does my Application () need to reference any of these?

I have set up the free Google account for testing, and "Google Calendar API is included on the list of enabled APIs when I navigate here: Google Cloud Platform

Google authentication requires a client ID & client Secret + a callback URL.

The error indicates you are using an invalid client id.

Please have a look at the link below for detailed instructions:

The demo provided shows the setting of 2 variables, the API Key and Secret. It does not show the setting of a Client ID anywhere.I do have a Client ID from Google, but I cannot see where it needs to be input in the demo.

I have looked under AdvGCalendar1.App and other locations in the source and I cannot find a ClientID anywhere.

I used the previous version of the components, and these worked well, these had code:

  GCalendar.RefreshToken:= 'xxxx';
  GCalendar.ClientID:= 'xxxx';
  GCalendar.ClientSecret:= 'xxxx';

Which worked with the older version of the Google API.

Hi Adam,

I use the Client-Id for the GAppKey and the API-Key for GAppSecret (see file APPIDS.INC)

In my program they are used like this:

  AdvGCalendar.App.Key := GAppkey;
  AdvGCalendar.App.Secret := GAppSecret;

Hope this helps