getAccessToken
Retrieve an access token.
const token = await drupal.getAccessToken(options?: { clientId, clientSecret, url?}): Promise<AccessToken>options- Optional
- If options is not provided,
DrupalClientwill use theclientIdandclientSecretconfigured inauth. clientId: string: The oauth client id.clientSecret: string: The oauth client secret.url: string: The oauth url. Default:/oauth/token.
Examples
const accessToken = await drupal.getAccessToken({ clientId: "7034f4db-7151-466f-a711-8384bddb9e60", clientSecret: "d92Fm^ds",})