Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Webservices api (latest)

Yannick Warnier edited this page Mar 10, 2026 · 1 revision

Introduction

In Chamilo 2.0, we are using API platform as an underlying layer to help us maintain webservices in better order than in previous versions.

Regarding previous versions of webservices

To be added

Endpoint

The endpoint now is very easy to get to: simply use your Chamilo portal's URL and add "/api" to the end of the root URL. For example: https://2.chamilo.org/api

If the technical documentation provided on the endpoint (through a web browser) is not enough, at the bottom of that page, you will find links to other formats of documentation or practice links.

Seeing the /api page requires either .env to define APP_ENABLE_API_ENTRYPOINT=true, or alternatively to define APP_ENV='dev' (which has considerable efficiency and security implications - not recommended!).

Authentication

First you need to get an authentification token using your username and password like this : curl -X POST --location "https://YOURCHAMILOPLATFORM/api/authentication_token" -H "Content-Type: application/json" -d "{ \"username\": \"YOURUSER\", \"password\": \"YOURPASSWORD\" }"

You will get the token in the answer like this : {"token":"eyJ0eXAiOiJKV1QiLCJ[...]h7MfgKhuAyBUgPLzsoCDMeWNtDyNknM5Hj1_j6gbDqQtfY0AdJJ7FhKzUwdornFGRTfgj_jyoP6MbEU8aBHELe3DjT9NA"}

Then you will be able to call the webservice needed using this token like this : curl -X 'POST' 'https://YOURCHAMILOPLATFORM/api/advanced/create-user-on-access-url' -H 'accept: application/ld+json' -H 'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJ[...]h7MfgKhuAyBUgPLzsoCDMeWNtDyNknM5Hj1_j6gbDqQtfY0AdJJ7FhKzUwdornFGRTfgj_jyoP6MbEU8aBHELe3DjT9NA' -H 'Content-Type: application/ld+json' -d '{ "username": "ana.luna", "firstname": "Ana", "lastname": "Luna", "email": "ana.luna@demo.com", "password": "securepass456", "accessUrlId": 1, "locale": "fr", "timezone": "Europe/Paris", "status": 3 }'

Changelog

This changelog starts pre-alpha for v2.0, on 2024年01月18日. Any change that affect the API are reported here.

Note: version 3.0.0 of the web services will only be coined on the date of the Chamilo v2.0 stable release, which has not happened yet.

Date API version Description Commit
2024年01月18日 v1.0.0 Starting point 173e359b

Chamilo LMS

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /