POST
/
customer
/
{customer_id}
/
token
import Openint from '@openint/sdk';

const client = new Openint({
  apiKey: process.env['OPENINT_API_KEY'], // This is the default and can be omitted
});

async function main() {
  const response = await client.createToken('customer_id');

  console.log(response.token);
}

main();
{
  "token": "<string>"
}

Authorizations

Authorization
string
header
required

Organization API key generated in the OpenInt Console and passed in the authorization header with format: Bearer {apiKey}

Path Parameters

customer_id
string
required

The id of the customer in your application. Ensure it is unique for that customer.

Body

application/json
validity_in_seconds
number
default:2592000

How long the token will be valid for (in seconds) before it expires

Required range: x > 0

Response

200
application/json
Successful response
token
string
required

The authentication token to use for API requests