How to setup dynamic google calendar Oauth with Va...
# support
a
Use case: I want to log in a user (in my SaaS) using Google Calendar and then create a voice assistant using Vapi that helps book meetings in the user’s calendar. The Vapi Create Assistant API (https://docs.vapi.ai/api-reference/assistants/create) has the option to connect dynamic credentials (using GoogleCalendarOAuth2AuthorizationCredential), which requires an authorizationId. What is this authorizationId, and how do I obtain it? I have set up custom OAuth with Google Calendar in my app and am getting access/refresh tokens for each user. How do I get the authorizationId from those tokens, or is there another way? Is it mandatory to use the https://www.nango.dev/ service?
c
Hey, I can help with that. The authorizationId is a unique identifier that you need to use when connecting dynamic credentials with the Vapi Create Assistant API. To obtain it, you typically need to follow the OAuth 2.0 flow, which involves getting the user's consent and then receiving an authorization code that you can exchange for tokens. Since you already have access and refresh tokens for each user, you should be able to use those tokens to authenticate API requests. However, the authorizationId itself is not directly derived from those tokens. As for using the Nango service, it is not mandatory, but it can simplify the process of managing OAuth credentials and tokens. If you have any more questions or need further clarification, feel free to ask.
a
@1338048783195570178 I got the code and then i generated the access token and refresh token. Out of them which one is authorization id?
@User @User
c
Hey Ankur, I sincerely apologize for the delay in our responses this week. We experimented with some process adjustments that didn’t work as intended, and unfortunately, this caused some disruptions. That’s entirely my responsibility. Just a quick note—our team is unavailable on weekends. However, if something urgent or critical comes up, feel free to reach out to me directly, and I’ll assist you. The support issues will be resolved in the coming weeks, and starting Monday, you can expect more consistent and improved support. Thank you so much for your patience and for continuing to stick with us!
a
Hey @User , I am not able to directly message you. Thanks for updating me on this.. I will wait for a day or two - for your response here.
@Vapi is there any update on this ? @User @User
c
Hi, First off, we want to sincerely apologize for the delay in getting back to you. We understand how frustrating it is to wait - especially when you're counting on us - and we owe you a clear explanation of what’s been happening and how we’re addressing it. Over the past few weeks, we've seen a significant increase in support requests. While this reflects exciting growth, it has also stretched our small team and exposed some real challenges in scaling our support operations. To improve your experience, we’ve taken a step back to reassess our approach. Here’s what we’re implementing: - Smarter Support Through Automation: We’re investing in our AI support systems to help you resolve issues more efficiently. Soon, our support bot will offer expanded capabilities, making it easier to access accurate, instant help—particularly for common or repetitive queries. - Expanding the Support Team: To meet growing demand, we’re adding 2–3 new team members focused on managing support volume and improving response times. - Prioritized SLAs for High-Usage Accounts: We’re introducing service level improvements for users who are growing with us: - Accounts with usage over 1,000 minutes/month will receive prioritized support. - For all general inquiries, we’re establishing a standardized 48-hour response time. We’re confident these steps will lead to faster, more reliable support and help us better serve you as you grow with us. Also, in case you still need help with this ongoing ticket, do let us know, and we will help you get this resolved as soon as possible. Thank you for your continued patience and for being part of our journey. Warm regards, Vapi Team
a
@User @User what's now? Possible to pay you for your support and get someone from your team to help? new account won't get any support at all?
c
Hi Ankur, The
authorizationId
is a unique identifier generated during the OAuth2 flow that allows your VAPI assistant to access a user's Google Calendar. Here's how you can obtain it and set up dynamic Google Calendar OAuth with a VAPI assistant: 1. **Set Up OAuth Flow**: Implement OAuth2 on your server to handle user authentication with Google. Store the access and refresh tokens securely. 2. Generate `authorizationId`: - When a user completes the OAuth2 flow, your server will receive access and refresh tokens. - Use a service like Nango to manage OAuth connections. After the OAuth flow completes, you'll get a
connectionId
which acts as your
authorizationId
. 3. **Configure VAPI Assistant**: - Provide the
authorizationId
in the assistant's configuration to allow it to access the specific user's calendar. - Example API call to set up the assistant with dynamic credentials:
Copy code
json
     {
       "assistant": {
         "credentials": [
           {
             "provider": "google.calendar.oauth2-authorization",
             "authorizationId": "YOUR_CONNECTION_ID"
           }
         ]
       }
     }
- This setup will enable the assistant to book meetings and access calendar details specific to each user. For more detailed guidance, check the VAPI documentation on [Google Calendar Integration](https://docs.vapi.ai/tools/google-calendar).
a
Hi @User @User I am getting following error after setting up the google calendar- { "error": { "message": "Request failed with status code 404", "data": { "error": { "message": "No connection matching the provided params of 'connection_id' and 'provider_config_key'. Please make sure these values exist in the Nango dashboard {\n \"connectionId\": \"99b2023a-c80e-4606-8241-1002baeb52cf\",\n \"providerConfigKey\": \"google-calendar\"\n}", "code": "unknown_connection", "payload": { "connectionId": "99b2023a-c80e-4606-8241-1002baeb52cf", "providerConfigKey": "google-calendar" } } } } } It looks like there should be a way to pass my Nango account token to VAPI so that it can find the details for the given connection ID.
c
VAPI uses their own nango account for managing google integrations and the platform currently does not support entering multiple credentials, however there may be a feature request for this specific scenario. If it isn't already on there, please submit a feature request as it would greatly improve our flexibility! If you would like to see that feature on our platform, feel free to add it to the feature request list here -->
2 Views