Authentication API
Papaya Global ensures the secure authentication of requests by employing an API key and Client ID. It is crucial to avoid sharing these credentials in publicly accessible areas like GitHub or client-side code. A bearer token is necessary to authenticate all API requests. All API requests must be made over HTTPS, as requests made over plain HTTP will not be successful. Moreover, any API requests made without proper authentication will also fail. It is important to note that the sandbox and production environments have separate keys and client IDs.Used for authenticating with Papaya Global servers.
Obtain Access Token
To acquire an access token, include your api_key
and client_secret
in the HTTP request header (Will be provided to you by the integration support). This token is essential for making calls to any other API endpoints, and the HTTP header must contain Authorization: Bearer [token]. The access token remains valid for 24 hours and can be utilized multiple times for all other API endpoints until it expires. It is advisable to rely on the expiration time provided (valid_until) in the response for a precise token expiration time.
POST
/token
Body Parameters Request
api_key
string
This is a unique identifier used to authenticate the client making the request (Will be provided to you by the integration support).
client_secret
string
This is a secret key associated with the API key. It acts as a password to provide an additional layer of security (Will be provided to you by the integration support).
expiration
numeric
This field specifies the time-to-live (TTL) for the token in seconds. If the field is not provided, the default 24-hour (86400 seconds) TTL will be used.
token_name
string
This field specifies a name for the token being created. If provided, this name will be assigned to the token. If not provided, a new random UUID will be used as the token name
Body parameters Response
valid_until
ISO 8601 date-time format
This field indicates the expiration date and time of the token.
token
JWT
This field contains the JWT itself.
token_name
string
This field specifies the name of the token being created.
Request Example
POST /token
Response
Last updated