Note: If you are using an older version of Fuse’s API (v4.4 and below) you can use the authentication method mentioned above or you can choose to use the deprecated authentication method.
Getting a token
:
Request
URL:
Method: POST
Request 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.bloggs@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"
],
"auth_tokens": {
"jwt_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJIb3RmaXgiLCJleHAiOjE3MzIxNDcxOTksImlhdCI6MTcyOTUwNTc3NiwiYXVkIjpudWxsLCJqdGkiOiIyOTQ5OS4xOTI4NTYifQ.qz_fLuuTvyUTveheP8bwLwnDBgw_KpjZTdMEUf2WSnY",
"user_authentication_token": {
"authentication_token": "RVt-k4zQJRyMBx3L",
"updated_at": 1728784853
}
}
}
The path to the authentication token is .auth_tokens.user_authentication_token.authentication_token
. In the example above the authentication token is RVt-k4zQJRyMBx3L
.
Using the token
For API v5 the authentication token must be presented in an Auth-Token request header along with the request. Below is an example of this:
curl -H 'Auth-Token: RVt-k4zQJRyMBx3L' https://<instance>.fuseuniversal.com/api/v5.0/users/me
If the token is no longer valid then you will receive a 401 response such as in the example below:
{
"success": false,
"errors": {
"base": "Unauthorized 401"
}
}
In this case you will need to try getting the latest token using the POST /session endpoint as stated above.