v1

latestOpenAPI 3.0.02026-07-244352379.2 KB
Bearer Tokens

Create a session token

📘 Authentication Guide

For comprehensive details about authenticating with the Forage API, refer to the authentication guide.

📘 Session Token Length

Session tokens are short-lived and expire after fifteen minutes.

⚠️ Authentication Token Required

You need to create an authentication token before you can generate a session token.

A POST request to /session_token/ creates a new session token. The token is returned as the token value in the response body.

A session token is a temporary OAuth 2.0 bearer token that expires after 15 minutes.

Session tokens are used in client-side requests. For example, POSTs to create a Payment Method require session tokens in the Authorization header, and session tokens are passed as parameters to SDK methods that submit customer data.

post/api/session_token/

Response

Created - Success

tokenstring

The authentication token to include as the bearer token in the Authorization header of client-side requests and as a parameter to SDK methods.

expiration_datestring

A UTC timestamp that indicates when the token expires, represented as an ISO 8601 date-time string.

Example response

{
  "token": "sandbox_eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhIjozOTYsImV4cCI6MTY4ODA4MTAzMH0.G9G97BGqEWpu3BfBo23MEVjr37ZdERplXD6cOx8BbiM",
  "expiration_date": "2023-08-02T20:07:07-07:00"
}