POST
/
auth-sessions
import Conductor from 'conductor-node';

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

async function main() {
  const authSession = await client.authSessions.create({
    endUserId: 'end_usr_1234567abcdefg',
    publishableKey: '{{YOUR_PUBLISHABLE_KEY}}',
  });

  console.log(authSession.id);
}

main();
{
  "id": "auth_sess_1234567abcdefg",
  "objectType": "auth_session",
  "createdAt": "2021-01-01T12:34:56.789Z",
  "endUserId": "end_usr_1234567abcdefg",
  "clientSecret": "auth_sess_client_secret_1234567abcdefg",
  "authFlowUrl": "https://connect.conductor.is/qbd/auth_sess_client_secret_1234567abcdefg?key={{YOUR_PUBLISHABLE_KEY}}",
  "expiresAt": "2021-01-01T12:34:56.789Z",
  "redirectUrl": "https://myapp.com/auth/callback"
}

Authorizations

Authorization
string
header
required

Your Conductor secret key using Bearer auth (e.g., "Authorization: Bearer {{YOUR_SECRET_KEY}}").

Body

application/json

Response

200 - application/json
Returns the auth session object.

The response is of type object.