Aurinko
Aurinko websiteAurinko blogAPI ReferenceContact Support
Aurinko API
Aurinko API
  • Getting started
    • What is Unified Mailbox API?
    • Getting started with Aurinko
    • Get your developer API keys
    • Adding Aurinko to Google Workspace allowlist
    • Bubble.io plugin
    • Team members and roles in applications
  • Unified APIs
    • Email API
    • Calendar API
    • Contacts API
    • Tasks API
    • Webhooks API
      • Configuring Pub/Sub for Gmail API Webhooks
    • Direct API
  • Authentication
    • OAuth Flow
      • Account OAuth Flow
      • User ОАuth Flow
      • Service Account OAuth Flow
    • Authentication scopes
    • Authorized return URLs
    • Google OAuth setup
    • Office 365 OAuth setup
    • ZOHO OAuth setup
    • Service accounts
      • Setting up G Suite service account
      • Setting up Office 365 daemon app registration
  • Scheduling
    • Create your first appointment booking page
    • Calendar Booking Page
    • Booking API
    • Group Booking API
  • Workspace Addons
    • Outlook addins
      • Create your first Outlook addin
      • Office 365: Installing Outlook addin
    • Microsoft Teams apps
      • Microsoft Teams bot setup
      • Create your first MS Teams app
      • Installing MS Teams app
    • Chrome Extensions with Google authentication
    • Google Workspace Add-Ons
  • Dynamic API
    • What is Dynamic (Virtual) API?
    • Getting Started with Dynamic API
Powered by GitBook
On this page
  • Setting up
  • OAuth Flow
  1. Getting started

Bubble.io plugin

Integrate your Bubble apps with users' email accounts through Aurinko's Unified Mailbox API to access their email and calendars.

PreviousAdding Aurinko to Google Workspace allowlistNextTeam members and roles in applications

Last updated 4 months ago

Integrate your Bubble apps with users' Gmail, Office 365, Outlook.com, hosted MS Exchange, Zoho Mail, and IMAP accounts through Aurinko's Unified Mailbox API. The Aurinko plugin allows your app to access users' email and calendars. Future versions can add access to contacts, tasks, and a number of CRM APIs.

Setting up


1. Signup for an Aurinko account, to get your APP_CLIENT_ID and APP_CLIENT_SECRET Get your developer API keys

2. Add the Aurinko API plugin to your Bubble application. Enter your APP_CLIENT_ID and APP_CLIENT_SECRET keys. For APP_API_DOMAIN specify 'api.aurinko.io'. (Ask us about configuring a custom domain alias.)

OAuth Flow


3. You need to have OAuth clientId and clientSecret from Google, Microsoft, Zoho to be able to use Aurinko's OAuth Flow in production. See how to register your apps: Google OAuth setup, Office 365 OAuth setup. But for testing during your trial you can use Aurinko's OAuth clientId and clientSecret. For Gmail you'll have to allow-list Aurinko: Adding Aurinko to Google Workspace allowlist.

Redirect URI: Redirect page vs. Custom domain alias

Google app registrations allow only authorized redirect URIs under a domain you own so the default Aurinko's Redirect URI https://api.aurinko.io/v1/auth/callback won't work for you in production.

You have two options:

  • Contact us about provisioning a domain alias for your Aurinko app so your could use a url like https://aurinko.mydomain/v1/auth/callback

  • Provision an aurinko_redirect page in Bubble and use it for redirecting all calls to Aurinko's https://api.aurinko.io/v1/auth/callback with the url parameters state, code, and scope.

In your Aurinko app settings insert the url of your aurinko_redirect page, and specify the url as an Authorized redirect URI in your Google app registration.

4. To start accessing email or calendar data you need to get a user authorization to access a remote account. Use the plugin's 'Get OAuth Url (Mailbox)' action to generate a required OAuth request url and the 'Open External Website' action with it.

Callback page (return_url)

Provision a callback page that will receive an Aurinko account token. All API calls require Bearer Auth with the account token.

  • For 'response_type=code' - Use the plugin's 'Get Token for Code' action to exchange the auth code for an account token. If you Save the token in your database.

  • For 'response_type=token' - Extract the token from the url parameter 'token' and remove it from the URL fragment with JavaScript.

5. Once your app has obtained account tokens it can start calling the API actions, or attaching the API as a data source, just insert the token (prefixed with 'Bearer ') into the 'Authorization:' header.

6. The following API methods have been defined in the plugin. Also see the full API reference.