Skip to content

Commit

Permalink
📝 Updated docs
Browse files Browse the repository at this point in the history
  • Loading branch information
naelob committed Jun 23, 2024
1 parent e6b29b8 commit a48a206
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions docs/open-source/contributors.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,45 @@ For the sake of this guide, let's map the common object `contact` under `crm` ca
</Step>
</Steps>

# Step 3: Test your new connector

Now you must test Panora unified endpoints with the new connector built.
<Steps>
<Step title="Create a connection using the magic link">
**If the connector uses oAuth:** <br/>
You need a set of credentials that you'll set in `.env` if you use oAuth (check above how it works).
Check [this guide](/core-concepts/magic-links) to create a connection through it.
To activate your new connector on the magic link, visit this [**file**](https://github.com/panoratech/Panora/blob/main/packages/shared/src/connectors/metadata.ts#L6) :
and change your connector status to `active: true`.
<br/>
**If the connector uses API KEY auth:**<br/>
You currently have to do a POST request to create a connection.<br/>
Create your query encoded URI by computing this:<br/>
```ts
const state = encodeURIComponent(JSON.stringify({ projectId, linkedUserId, providerName, vertical, returnUrl }));
```
The values for `linkedUserId` and `projectId` are to be found within the webapp at `localhost`
```shell Insert an api key connection
curl --request POST \
--url http://localhost:3000/connections/apikey/callback?query=state \
--header 'Content-Type: application/json' \
--data '{
"apikey": "YOUR_CONNECTOR_API_KEY",
// if your connector needs more parameters for auth (e.g username or whatever)
//"username": "YOUR_USERNAME_VALUE"
}'
```
</Step>
<Step title="Test with unified endpoints">
Now after successfully creating a new connection, you can copy a `connection token` inside the webapp under `http://localhost/connections`.
<br/>
Create a Panora Api Key and make unified request with your `connection token`.
Check [this guide]((/core-concepts/auth)) to do it !
</Step>
</Steps>



### Congrats, you now have built a new integration with Panora ! 🦸‍♀️

<Info>
Expand Down

0 comments on commit a48a206

Please sign in to comment.