Skip to main content

Access LRS using Oauth2 token

  • January 11, 2024
  • 7 replies
  • 473 views

I need to interact with docebo lrs using Oauth2 token. I generate an access token using client_credentials grant type but when I use that to access LRS. It’s showing me 401 unauthorized access

7 replies

Bfarkas
Hero III
Forum|alt.badge.img+6
  • Hero III
  • January 14, 2024

Can you provide more details, are you using an API to get there, if so which one, if not, what exactly are you doing for access? Something to note is Docebo uses their own items for their building, so end users don’t always get rights access to them.


  • Author
  • Novice I
  • January 15, 2024

Hello @Bfarkas,  I'm attempting to generate an access token for accessing the Docebo LRS to fetch and post xAPI statements. I've successfully generated the token using JWT Bearer token, enabling me to access the Docebo LRS and retrieve xAPI statements. However, I encounter issues when trying to post an xAPI statement with a different user context, i.e., specifying another username and email in the xAPI statement. This operation results in an error message stating that I am not allowed to perform this action with another user context. Could you kindly provide a solution to overcome this issue?


Bfarkas
Hero III
Forum|alt.badge.img+6
  • Hero III
  • January 15, 2024

Still not exactly following what/how you are doing what you are doing, more detail of exactly the steps you are doing would be useful.


  • Author
  • Novice I
  • January 16, 2024

Ok let me make this simple. I am trying to generate an access token through which I need to access the Docebo APIs. I need some guidance how I can generate this access token from within c# code by making a post request.

I followed this url but wasn’t able to achieve what I need:
https://help.docebo.com/hc/en-us/articles/360020082060-APIs-Authentication 


Forum|alt.badge.img

I am not completely sure if we are talking about the same thing, but have you tried this endpoint: /manage/v1/user/login? You can find it in your api browser here: /api-browser/#!/manage/User/User_manage_v1_user_login. The standard payload is:

{
"username": "string",
"password": "string",
"client_timezone_textual": "string",
"client_timezone": 0,
"issue_refresh_token": true
}

You can generate a token by only using “username” and “password”.

If you want to revoke your token at the end, you can use the endpoint /manage/v1/user/logout with the token.


Bfarkas
Hero III
Forum|alt.badge.img+6
  • Hero III
  • January 16, 2024

Ok let me make this simple. I am trying to generate an access token through which I need to access the Docebo APIs. I need some guidance how I can generate this access token from within c# code by making a post request.

I followed this url but wasn’t able to achieve what I need:
https://help.docebo.com/hc/en-us/articles/360020082060-APIs-Authentication 

I understand the overall process and authentication, the part you keep missing details on is what is the request you are doing, which post request are you doing? Details help us troubleshoot, without them, can’t do much. 


  • Newcomer
  • November 10, 2025

@vamsi0311 were you ever able to get OAuth to work for the LRS?  I have the exact same issue.