This guide assumes you have a Panora account, or a working self-hosted version

The Panora API uses uses two elements to indentify requests.

  • API key which is a Bearer Acess Token used to authenticate yourself to our backend.
  • connection_token which serves to identify which of your user’s you’re making API calls for.

Depending on your setup, you should make requests to one of those endpoints:

https://api.panora.dev/

Learn how to generate your API Keys

1

Creating your API Key

Go to your dashboard, and visit the API Keys section. Click the Create New Key button.

2

Safely store your API Key

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

Catch connection tokens

A connection_token is created everytime a user connects an account to your platform.
Once you’ve set up the auth flow through magic-link or using the embedded snippet, you need to setup a webhook and listen to events tagged as connection.created.

The connection_token is a string, located in the data object, inside a connection.created event.

Example connection.created event
{
    "id_event": "dc2d12b9-dd07-4e33-a244-d0560a9eeed7",
    "type": "connection.created",
    "data": {
        "id" : "6fc7017a-6596-4b05-81b6-595296a59f87"
        "connection_token": "MY_CONNECTION_TOKEN",
        "provider_slug": "hubspot",
        ...
    },
    ...
}

Congrats ! You have everything you need to make authenticated requests.

Make your first API request with your API Key and a connection_token

Take a look at these examples to understand the concept. We also recommend practising by looking at the specific verticals you want to integrate.

You can find the Typescript SDK on NPM here

In this example, we will create a contact in a CRM. Visit other sections of the documentation to find category-specific examples.

import { PanoraSDK } from '@panora/sdk-typescript';

const sdk = new PanoraSDK({ accessToken: "MY_API_KEY" });

const input = {
    first_name: 'tom',
    last_name: 'jedusor',
    email_addresses: [
      {
        'email_address': 'tom@jedusor.com',
        'email_address_type': 'PERSONAL'
      }
    ],
    phone_numbers: [
      {
        'phone_number': '+33650438278',
        'phone_type': 'MOBILE'
      }
    ],
};

const result = await sdk.crmContact.addContact(input, 'MY_USER_CONNECTION_TOKEN', {
    remoteData: true,
});

console.log(result);

Read more about our SDKs in TypeScript, Python.