Question

API Client credentials - Invalid credentials

  • 31 July 2023
  • 2 replies
  • 285 views

I have created an API Client credentials.

With advanced properties of: Client Credentials checked

When I query https://xxx.docebosaas.com/oauth2/token
I get token

But when using this token to query endpoint:

/course/v1/courses

Or

/learn/v1/courses

I get 401 response: Your request was made with invalid credentials.

How can you help with understanding what is failing with the API credentials ?

Is there a log somewhere ?

Is there another settings point to set that the API will response to /course/v1/courses ?

The API documentation is vague about this.

 

Thanks,

Noam.


2 replies

Userlevel 7
Badge

Hi @NoamH, and thank you for reaching out to the community about your API issue! Taking a quick look, it seems that the issue may be the authentication method you’re using.

 

As noted in this Knowledge Base article, to query the endpoints documented in the API Browser, you cannot use the Client Credentials method:

“Please Note: With the new 7.0 APIs, found at https://YOURLMS.docebosaas.com/api-browser/, the system requires a specific user permission in order to work properly. Because of this, you will not be able to use client credentials to call this type of API.”

 

Instead, you should select the Resource Owner Password Credentials option (grant_type is password). A Superadmin login is required for authentication.

Hi @elliott.vickrey, I tried the same with the JWT token. I was able to generate the token, access Docebo LRS and fetch the xAPI statements. But when I push a xAPI Statement with another user context i.e. with another username and email ID, I am getting an error that I am not allowed to do that. How can I solve this or is there any other approach other than using Resource Owner Password Credentials option to generate an access token and use that to make post request to LRS with another user context?

Reply