POST
/
auth
/
user_token
import Hyperspell from 'hyperspell';

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

async function main() {
  const token = await client.auth.userToken({ user_id: 'user_id' });

  console.log(token.token);
}

main();
{
  "token": "<string>",
  "expires_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
user_id
string
required

Response

200
application/json
Successful Response
token
string
required
expires_at
string
required