Authentication

You'll need to authenticate your requests to access any of the endpoints in the Previsto API. In this guide, we'll look at how authentication works. Previsto requires you to authenticate with your API key with Basic Auth.

Retrieving an API key

You can easily get an API key for integrating with our API. Simply follow this 4-step guide.

  • 1: Log into Previsto: Open up https://app.previsto.com and ensure you are logged in with the correct user and into the correct organization.

  • 2: Open settings: Click the cogwheel in the down-left corner. This will open up settings for your organization.

  • 3: Open Developer settings: Click Developer in the menu. This will show you settings related to integration with Previsto's API.

  • 4: Grab API-key: At this page you will be able to see your API-keys. If none are showed then click "Generate API-keys". You will have 2 API-keys: 1 public and 1 secret. You will need the secret API-key - and you will need to keep it secret. Do not share with someone you do not trust and do not make it public.

Basic Auth

You can use your API key as a username to authenticate with your HTTP requests. You can omit the password. Here's how to authenticate using cURL:

Example request with basic auth

curl https://api.previsto.io/contacts \
  -u sk_12345: \

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. You must authenticate for all requests.

Please don't publish your secret Previsto API key anywhere!