Skip to main content

Documentation

IMPORTANT

This is the outdated SI-documentation which will be adapted soon. A huge part may be obsolete!

Authentication

Authentication

Several EasyDiscuss REST API requires authentication. This authentication code will be generated by EasyDiscuss system and then be presented in the form of JSON to the requester.

Before performing any REST API calls, you will need have a valid authorization code. This code can be retrieved by exchanging the authorization token between the requester and the EasyDiscuss system. This exchange process require requester to send a POST data to the following url:

http://site.com/index.php?option=com_easydiscuss&view=account&format=json&tmpl=component

POST Parameters

The following are the required parameters when a POST is made to this API call:

  • username (required)
    This is the username of a registered user requesting authentication to the system.
  • password (required)
    This is the password of a registered user requesting authentication to the system.

Response

Upon successful authorization, the user's id and an auth token will be represented to the requester. These information are essential and need to be stored in a secure location because these information are another representation of password.

Upon receiving the auth token and user id, you will need to send these information on every subsequent API calls made to the system.

The successful authorization response will looks similar as below:

{
    "auth": "e18c957b5c206e170863f9e2e405912d",
    "code": 200,
    "id": "549"
}

And a fail authorization response will looks similar as below:

{
    "code": 403,
    "message": "Invalid username or password provided"
}
We use cookies
We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience. You can decide whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.