Get a token
Yeah, this is the boring security stuff. Just get your super secret token and move on.
Body·
Credentials to authenticate a user
Credentials to authenticate a user
- Type: string Format: emailemailrequired
- Type: stringpasswordwrite-onlyrequired
Responses
Request Example for post/auth/token
import DemoAPIScalarGalaxy from '@brynn-team/demo-api-scalar-galaxy';
const client = new DemoAPIScalarGalaxy({
bearerAuth: process.env['BEARER_AUTH'], // defaults to the BEARER_AUTH env var
environment: 'production',
});
const authentication = await client.authentication.createToken({
email: 'marc@scalar.com',
password: 'i-love-scalar',
});
console.log(authentication);
{
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c"
}