---
title: API Connector
slug: bubble/api-connectivity
description: OAuth + API calls in your Bubble.io app using Pathfix
docTags: 
createdAt: 2020-12-11T06:20:55.000Z
---

With Pathfix, you can establish a connection with any OAuth service provider **AND&#xA0;**&#x6D;ake API calls between these apps for your users.

Pathfix works as a pass-through API that stamps all your requests with the required tokens and sends your requests to the provider, allowing you to consume ANY API endpoint offered by the provider.&#x20;

IMPORTANT: **This is Step 2** of the setup and you need to have completed Step 1 (User Authorization) first before calling any API.

Need documentation for Bubble User Authorization setup?  Check it here [Bubble User Authorization](docId\:UgEtlX9C83jcT0lM9Q-YC)&#x20;



## Video Walkthrough

::embed[]{url="https://youtu.be/KvK1GkCE9LU"}



## Bubble API Connector

All your API calls will have to go through Pathfix so that we can stamp each call with the relevant tokens for the user and then send it to the provider. This API call structure is found in Pathfix under **API Call**

- To view a sample of API call, click on Test Connection and Connect an account
- From the Sample Method dropdown, select any of the sample API calls configured and hit Send

﻿

::Image[]{src="https://api.archbee.com/api/optimize/E6H_--BmYJWG_yGaOUOxt/i0ONWdqHGMfXRaUsImuOA_image.png" size="90" width="2067" height="1045" caption="Testing Connection" position="center" showCaption="true"}



- You should receive a success response from the provider&#x20;

::Image[]{src="https://api.archbee.com/api/optimize/E6H_--BmYJWG_yGaOUOxt/ZT2gCZ6MUwir9AIwkU2rl_image.png" size="90" width="2047" height="1053" caption="Response" position="center" showCaption="true"}



To make the API call to pull data from the provider, you will need to use the Bubble API Connector Plugin.

- In Bubble, click on `Plugins` from the left nav bar
- Click on `Add Plugins` and search for API Connector&#x20;
- `Install` the Bubble API Connector plugin



::Image[]{src="https://api.archbee.com/api/presign/E6H_--BmYJWG_yGaOUOxt/-MHSspyBIuZQi7JmDmuyW_image.png" size="72" caption="Image: Bubble API Connector" position="center" showCaption="true"}



- Change the API Name for ease of reference and choose Authentication type as Private key in URL
- Enter your Pathfix Private Key from your Pathfix application (see how you can find your keys here [Pathfix keys](docId\:tRi5ksZom6Wo-bvFAZVWa)) add a call, give it a name for internal reference&#x20;
- Add POST call to the Pathfix endpoint (the method used will always be POST)
- In the JSON body, enter the endpoint URL, the method for the call and the payload&#x20;
- Enter the public\_key and user\_id under parameters and add the JSON Body&#x20;
- Click on Initialize Call
- Upon successful configuration and data mapping, you will be able to use this API call with your Bubble user data.&#x20;



### Sample Setup

Here is a sample setup using the Bubble API Connector with further detailed instructions:&#x20;



::Image[]{src="https://api.archbee.com/api/presign/E6H_--BmYJWG_yGaOUOxt/VnKslt0dgmBSwSK4RoSyr_apiconnector2.png" size="86" caption="Image: API Connector Setup" position="center" showCaption="true"}



1. **Key Value** and **Development Key Value** is the Pathfix private\_key&#x20;
2. Add the **POST&#x20;**&#x55;RL as `https://labs.pathfix.com/oauth/method/{providername}/call`&#x20;
3. **Key** name should be public\_key the value of key can be found at&#x20;
   1. Check **Private**&#x20;
   2. Check **Queryst.**
4. **Key** name should be user\_id. Enter your Pathfix login email ID over here. (Note: Ensure that you have tested the connection after configuring your integration in Pathfix)
   1. Uncheck **Private**
   2. Check **Queryst.**
5. (below) While configuring to use the API in a datasource element or a workflow action, ensure that the **user\_id** points to the **Current User's unique id&#x20;**



::Image[]{src="https://api.archbee.com/api/presign/E6H_--BmYJWG_yGaOUOxt/u_ENqD8fsRc3Fcos6J8PH_image.png" size="50" caption="Image: Update user_id" position="center" showCaption="true"}





This will enable the functionality that will allow the message/payload sending between your app and the service provider.﻿

Not comfortable working with APIs directly? Take a look at some of our [pre-configured plugins here](https://docs.pathfix.com/bubble/no-code-plugins)&#x20;

﻿



Having trouble? Reach out to us at support\@pathfix.com and we would be happy to help you.










