Space Invoices utilizes Access Token based authentication to grant access to the API. You can obtain an access token from our developer dashboard, Mission Control.

Using an Access Token

For all API requests to the server, include the access token in a header as shown below:

'Authorization: ACCESS_TOKEN'

In query params

As an alternative, you can add the launch code as a query parameter in the URL. However, be aware that this approach poses some security risks!


In documentation

When logged into, the documentation examples will already include your actual launch code.

For production use, we recommend generating a new, non-expiring access token through Mission Control.

        const response = await fetch('{id}/documents', {
  method: 'GET',
  headers: {
    "Authorization": "ACCESS_TOKEN",
    "Content-Type": "application/json",

Your access token is displayed in examples.

Prerequisite: npm install node-fetch

          curl -X GET '{id}/documents' \
  -H 'Authorization: ACCESS_TOKEN' \
  -H 'Content-Type: application/json'        

Your access token displayed in examples.

          import requests
url = "{id}/documents"
headers = {
  'Authorization': 'ACCESS_TOKEN',
  'Content-Type': 'application/json'
response = requests.get(url, params={}, headers=headers)        

Your access token displayed in examples.

Next: Filters >