Services Plugins FAQs

SmartCalender Course help

Hi everyboby,
i need some help with the course “SmartCalender”. I have this error message:


But it sems to be good with the parameters…:

Secondly i have this problem too:
Screenshot_2020-07-08 Bubble Editor - Smartcalendar(3)

the Calendar API token seems to expire… Why? what is the procedure?

Thanks a lot
Jean

Hello, @jeanpeche. Thanks for reaching out.

Let us please investigate the issue you’ve faced. I will inform you once I have any useful info on your case. Thanks for understanding :pray:

Regards,

Hi Kate,
i am following the SmartCalendar course too but getting an error message when initializing the calendar free/busy api call, please see below screen capture of the error message and setup
:


appreciate your advice and help please.

thanks,
leon

Hello, @leonlimyt. Thanks for reaching out.

You are receiving the error with the Status code 401 “Invalid Credentials” because the credentials of the app you’ve created are already expired. Also, you can see the following alert message in the Google Calendar API you’ve created in the API Connector:

To resolve the Authentication Error you need to Refresh your Token (Secret Key) in the Credentials section of your application:

or Get an OAuth2 Refresh Token and Configure Your Client:

To initialize the Free/Busy API Call, you need to make sure that:

  • your token is not expired;
  • you have entered all the necessary redirect URIs;
  • you have created at least 1 event in your google calendar.

Please take a look at this short guide:
https://www.loom.com/share/371dcc6de7cd4f64b884ad19131fba0d

I hope it helps :pray:
Regards,

Thanks Kate for your prompt response but I am getting only 3 returned values instead of 6, see below:

As for refreshing the access token, it is still unclear how this is setup after reading the reference document and appreciate your help with the steps or a short guide please.

thanks for your patience as i am a non-developer.
leon

i think you have forgotten " " in the Json code

Thanks Jean but don’t think I have missed out " " in the json code, see below:
calendar api error 5

I managed to get all 6 returned values eventually after adding some test events in my calendar and looks to be working now.

However, I am still not able to setup auto refresh for the access token and hope to get some help.

regards,
leon

Hello, @leonlimyt.

Try to add the event into your Calendar for the date you’re indicating in the JSON code. For example, if you have indicated the date range 2020-07-20/30, add some test event on the 2020-07-21. This will help you to get the necessary returned values.

@jeanpeche, thank you for your patience :pray:
I suppose, to resolve the “token is not valid”/“401 Invalid credentials” issue you can by following my instructions, which I’ve given to leonlimyt - it should help.

The reason why token is expiring so fast - it has a short-time living period, which can be extended by developer. The workaround for this case is a resetting of the secret key, that I’ve suggested.

Please let me know if you have some else issues with the Smart Calendar Course, I will try to assist :slightly_smiling_face:
Regards,

Hi Kate, Thanks for your response and advice. The issue was indeed resolved after adding samples events into my calendar. However, I encountered another issue relating to testing the booking app and the error message is shown below:

i have checked the quota on google console and it seems to be well within.
Any idea what is causing this error?

thanks and appreciate any help.
leon

It managed to work again after I have logout and re-login to the apps and this leads me to the question if there is a way to prevent this from happening in a marketplace booking apps?

@leonlimyt,

Let me please check this moment with my colleagues. I will get back to you asap, once I have any useful insights.

Thank you for understanding :pray:
Regards,

@leonlimyt,

You can try to do the following when you have this message in your API Connector:

  • go to your index page version-test?debug_mode=true;
  • initialize the OAuth2 in order to get the success notification.
    But once you refresh the Editor, you will be needed to re-initialize the OAuth2 (do the steps described above).

https://www.loom.com/share/cea1adc2454e4e3ea39653ccc87b9b65

If you make a deploy to live when you have set the OAuth2 correctly, there won’t be any troubles with the Google Calendar on live:
https://www.loom.com/share/413edb43ac234edcb0e0dc952c41214a

I hope this helps :pray:
Regards,

Thanks Kate for the advice and I did use the steps to re-initialize the OAuth2 every time it gets logout. I just hope it will not keep logging out when the app is deployed to live else user experience will be impacted.

@leonlimyt,

Sure thing. If you face any trouble, let me know please. We will try to find a way out together :slightly_smiling_face:

Regards,

Hi! I keep getting this error message when I try to initialize the call:

This is my setup, did I get anything wrong?

I also created a few test events in my calendar as suggested but it’s still not working.

@rehermannanna,

  1. Please try to add the test keys as well - you can paste the same keys that you have in the Live field:

    ;

  2. remove the “group expansion max” and “calendarexpansionmax” values - keep the necessary values only - Screenshot by Lightshot (if you set everything correctly, you’ll see this - Screenshot by Lightshot);

  3. if you face the “token is not valid anymore” message, you just need to reset your secret key (save) and reinitialize the API call. The instructions of this I’ve given above, please take a look.

I hope it helps :pray:
Regards, Kate

Thanks so much Kate!

I made the recommended changes but am still getting the same error message:

@rehermannanna,

Please make sure that:

  1. your secret keys are correct (I’m not sure that keys can start from symbols, but not letters);
  2. try to surround the word primary into the quotes - “primary”.

Perhaps my screen-sharing can throw some light on your trouble:

I hope it helps :pray:
Regards, Kate

Thanks so much Kate! The quotes surrounding the word primary fixed it, all working now :slight_smile:

1 Like

@rehermannanna,

Cool! I’m glad it was helpful :slightly_smiling_face:
Have a good studying time!

Regards, Kate