@assistants-center/identity
v2.0.0-beta.8
Published
A library for interacting with the Assistants' Center Identity API
Downloads
19
Readme
Assistants' Center Identity Client Module
Installation
npm install @assistants-center/identity-client
Usage
import { IdentityClient } from '@assistants-center/identity-client';
const identityClient = new IdentityClient({
clientId: "client_id",
clientSecret: "client_secret",
redirectUri: "https://example.com/redirect",
scopes: ["account:read"],
identityUrl: "https://identity.assistantscenter.com"
});
// Get the URL to redirect the user to
const url = identityClient.getUrl();
// https://identity.assistantscenter.com/api/auth/authorize?client_id=client_id&redirect_uri=https://example.com/redirect&scope=admin%20account%3Aread
// Get the access token
const token = await identityClient.getAccessToken("code");
// Get the user info
const user = await identityClient.getUserInfo(token.access_token);
Documentation
Soon to come.
Requesting a Client
To request your own Client, please contact us at: [email protected]
License
This project falls under the MIT license.