we enabled SAML SSO in the org yesterday. now my simple node script that grabs an access token for the web messenger widget is failing with a 401.
const auth = require('@genesyscloud/auth');
const authClient = auth.createAuthClient({
clientId: 'my-client-id',
clientSecret: 'my-secret',
environment: 'mypurecloud.com'
});
authClient.createApplicationAuthClientCredentials().then(res => console.log(res));
the error says invalid_grant and mentions something about the client not being allowed for this grant type. i thought SAML only affected the UI login. do i need to change how i request the token in code?
- gen: 1.0.0
- node: 18.17.0
- saml: enabled
- auth method: client credentials