HomeGuidesReference↗ Forage Dashboard
Log In
Reference

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.

Headers
string
required

An OAuth 2.0 authentication token that validates the request. Send a POST to the /o/token/ endpoint to generate an authentication token. Pass the token in this header after the word Bearer and a whitespace, for example Bearer <api_key>.

string
required

A unique merchant ID that Forage provides during onboarding, as in 123ab45c67. The Merchant ID can be found in the Forage sandbox or production dashboard.

Responses

Language
URL
LoadingLoading…
Response
Choose an example:
application/json