Skip to content

Commit

Permalink
📝 Updated some docs
Browse files Browse the repository at this point in the history
  • Loading branch information
naelob committed May 17, 2024
1 parent ae8128f commit f8abcf8
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 33 deletions.
46 changes: 24 additions & 22 deletions docs/core-concepts/auth.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Depending on your setup, you should make requests to one of those endpoints:

</Tabs>

## Learn how to generate your API Keys and catch connection tokens.
## Learn how to generate your API Keys

<Steps>

Expand All @@ -46,31 +46,33 @@ Depending on your setup, you should make requests to one of those endpoints:
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.
</Step>

<Step title="Catch your connection token">
</Steps>

A `connection_token` is created everytime a user connects an account to your platform.
You need to setup a webhook and listen to events tagged as `connection.created` to catch a it.
The `connection_token` is a string, located in the _data_ object, inside a `connection.created` event.
## Catch connection tokens

<Info>Read more about webhooks [here](/webhooks/overview)</Info>
A `connection_token` is created everytime a user connects an account to your platform.<br/>
Once you've set up the auth flow through [magic-link or using the mbedded snippet](/quick-start), you need to setup a [webhook](/webhooks/overview) and listen to events tagged as `connection.created`.

```json 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",
...
},
<Info>
The `connection_token` is a string, located in the _data_ object, inside a
`connection.created` event.
</Info>

```json 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.
</Step>
},
...
}
```

</Steps>
Congrats ! You have everything you need to make authenticated requests.

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

Expand Down Expand Up @@ -170,4 +172,4 @@ We also recommend practising by looking at the specific verticals you want to in
```
</CodeGroup>

Read more about our SDKs in [TypeScript](/backend-sdk/typescript), [Java](/backend-sdk/java), [Python](/backend-sdk/python)
Read more about our SDKs in [TypeScript](/backend-sdk/typescript), [Python](/backend-sdk/python).
14 changes: 8 additions & 6 deletions docs/core-concepts/magic-links.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,13 @@ description: "Use Magic Links to invite your users to grant you access to their
icon: "wand-magic-sparkles"
---

<img
className="block dark:hidden"
src="/images/generate-magic-link.gif"
alt="Hero Light"
/>
<Frame type="glass">
<img
className="block dark:hidden"
src="/images/generate-magic-link.gif"
alt="Hero Light"
/>
</Frame>

## Send your first Magic Link

Expand All @@ -31,4 +33,4 @@ icon: "wand-magic-sparkles"
</Steps>

Once the user successfully completes the granting auth flow, the connection will have a `status` value of `valid`.
We recommend listening to [webhooks](/webhooks/overview) to get notified once a user connects.
We recommend listening to [webhooks](/webhooks/overview) to get notified once a user connects and catch the connection token used for requests.
9 changes: 5 additions & 4 deletions docs/open-source/contributors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ We made a docker file that builds Panora from sources, specifically to help you
</Step>
<Step title="Rules for env variables">
<Info>
You must create manually a custom oAuth2 app inside the 3rd party and copy the
critical values (_client id and client secret_)
You must manually create a custom OAuth2 App inside the 3rd party and copy the
critical values (likely _client id and client secret_)
</Info>
You have the option to manage a custom 3rd party oAuth app.
You have the option to manage a custom 3rd party OAuth App.

**Each custom 3rd party environment variable must be of the form `PROVIDER_VERTICAL_SOFTWAREMODE_ATTRIBUTE` where**

Expand Down Expand Up @@ -88,7 +88,7 @@ It should be available (if not [contact us](https://app.cal.com/rflih/30)) with
Actually an integration is built in 2 parts :

- the **authentication part** (oauth, api key, basic etc) which is built by the Panora team
- the **service integration** where the mapping is created with our unified model which is what you'll build
- the **service integration** where the mapping with our unified model is created whixch is what you'll build in the next steps

# Step 2: Build your provider service

Expand Down Expand Up @@ -224,6 +224,7 @@ For the sake of this guide, let's map the common object `contact` under `crm` ve
</Step>

<Step title="Enable your new service">
After these 3 files are successfully created and filled, you are ready to to fix all dependencies/linting issues that you may have. <br/>
To make sure the service is enabled, dependencies and imports must be added. <br/>
We built a script that does it in seconds. You can execute the given command from the root directory of Panora.

Expand Down
2 changes: 1 addition & 1 deletion docs/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ Choose the one that fits your needs !
</Steps>
Once the user successfully completes the granting auth flow, the connection will have a `status` value of `valid`.
We recommend listening to [webhooks](/webhooks/overview) to get notified once a user connects.
We recommend listening to [webhooks](/webhooks/overview) to get notified once a user connects and catch the connection token used for requests.
## **Step 2: Send your first unified API requests**
Expand Down

0 comments on commit f8abcf8

Please sign in to comment.