Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 39 Next »

If you are using Fuse's API v5.0 and above, you must obtain a JWT token (JSON Web Token) when authenticating. From v5.0 onwards, we’ve made some security enhancements, and as part of these enhancements, a new JWT token will be generated at regular intervals.

Note: If you are using a legacy version of Fuse’s API (v4.4 and below) you do not need to obtain a rotating JWT token. This is only required for v5.0 and above. For information on obtaining auth tokens in v4.4 and below, see here.

To obtain a JWT token for your session, you must use the following POST request:

POST: /session

Request

POST: /session

https://<instance_name>.fuseuniversal.com/api/v5.0/session

Request parameters

When using this request, you must include the following mandatory parameters:

  • login_name: This is your username or email address used to log in to your Fuse instance, assigned to you when your account was created (e.g. joe.bloggs or joe.blogs@email.com).

  • password: This is your password used to log in to your Fuse instance.

Example response

{
  "success": true,
  "role": "admin",
  "administerable_community_ids": [
    9,
    10,
    11
  ],
  "admin_group_permissions": [
    "compliance_reporting"
  ],
  "is_manager": true,
  "terms_and_conditions_accepted": true,
  "password_change_required": false,
  "terms_and_conditions": null,
  "password_requirements": null,
  "jwt_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJIb3RmaXgiLCJleHAiOjE3MzIxNDcxOTksImlhdCI6MTcyOTUwNTc3NiwiYXVkIjpudWxsLCJqdGkiOiIyOTQ5OS4xOTI4NTYifQ.qz_fLuuTvyUTveheP8bwLwnDBgw_KpjZTdMEUf2WSnY",
  "auth_tokens": {
    "jwt_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJIb3RmaXgiLCJleHAiOjE3MzIxNDcxOTksImlhdCI6MTcyOTUwNTc3NiwiYXVkIjpudWxsLCJqdGkiOiIyOTQ5OS4xOTI4NTYifQ.qz_fLuuTvyUTveheP8bwLwnDBgw_KpjZTdMEUf2WSnY",
    "user_authentication_token": {
      "authentication_token": "RVt-k4zQJRyMBx3L",
      "updated_at": 1728784853
    }
  }
}

Obtaining a token using cURL

Below is an example of how to obtain a token using cURL:

Request

curl --header 'Auth-Token: token_value_here' https://<instance_name>.fuseuniversal.com/api/v5.0/users/me

Example response

{
  "authentication_token": "rVIG4LQ8kNvyu763",
  "updated_at": 1728957654
}

When using the legacy Fuse API (v4.4 and below), the request is as follows:

curl https://<instance_name>.fuseuniversal.com/api/v4.0/users/me?auth_token=1234abcd

JavaScript <<Francois to provide specific examples>>

For more information about the POST: /session endpoint, please reference the API documentation section in the Admin Panel of your instance:

Screenshot 2024-10-21 at 11.07.23.png
  • No labels