To securely access and interact with Gumloop’s API, authentication is required. Users must generate an API Key, which will be used to authenticate requests.

Each workspace has a separate API Key which can be generated under the workspace settings where all of the other workspace credentials are found.

Generating an API Key

Visit https://www.gumloop.com/profile#Credentials to generate your unique API Key. This key is essential for making authenticated requests to Gumloop’s API.

Using the API Key

With your API Key, you must include it in the headers of every request to the API. The API Key should be sent as an Authorization Bearer token.

Example of Including API Key in Requests

To authenticate your requests, include your API Key in the request headers as an Authorization Bearer token. Below are examples of how to include the API Key in requests using Python, JavaScript, and cURL.

cURL

curl -X POST \
      https://api.gumloop.com/api/v1/start_pipeline \
      -H "Content-Type: application/json" \
      -H "Authorization: Bearer [INSERT API KEY HERE]" \
      -d '{
        "user_id": "xxxxxxxxxxxxxx",
        "saved_item_id": "xxxxxxxxxxxxxx",
      }'

Python

import requests
import json

url = "https://api.gumloop.com/api/v1/start_pipeline"
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer [INSERT API KEY HERE]"
}
data = {
    "user_id": "xxxxxxxxxxxxxx",
    "saved_item_id": "xxxxxxxxxxxxxx",
}

response = requests.post(url, headers=headers, data=json.dumps(data))

JavaScript

const url = 'https://api.gumloop.com/api/v1/start_pipeline';
const headers = {
  'Content-Type': 'application/json',
  Authorization: 'Bearer [INSERT API KEY HERE]',
};
const data = {
  user_id: 'xxxxxxxxxxxxxx',
  saved_item_id: 'xxxxxxxxxxxxxx',
};

fetch(url, {
  method: 'POST',
  headers: headers,
  body: JSON.stringify(data),
})
  .then((response) => response.json())
  .then((data) => console.log(data));