Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-05-2022 09:09 AM
Hello everyone, I'm switching to the new API and I'm having trouble getting the authorization/Authentication token to work. I'm currently using the Access token provided by the XIQ dashboard, like it was on the old API, but now I keep getting the 'JWT strings must contain exactly 2 period characters. Found: 0' error everytime I try calling the auth/apitoken endpoint to get the API Token. I noticed the token I'm supposed to have should be a three part one, but couldn't generate one on the dashboard and also couldn't find a good example/explanation on how to proper use/generate it. Does anyone know how to properly get the access/authorization token or have a guide I can follow?
Any help is welcome, thanks
Any help is welcome, thanks
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-06-2022 02:09 AM
@gabriel baima,
The token you got from XIQ Global Setting page is for old API only. To get the access token for the new API, you can call the end point "/login" on https://api.extremecloudiq.com. Once you get the access code, you use it as part of the Bearer Authorization header when calling other API endpoints. The following are examples.
Login to get the access code:
List the admin users with the access code:
You can test the New API on the following Swagger site directly.
https://api.extremecloudiq.com/swagger-ui/index.html?configUrl=/openapi/swagger-config#/
References:
https://extremecloudiq.com/api-docs/api-docs.html#_authentication
https://developer.extremecloudiq.com/​
The token you got from XIQ Global Setting page is for old API only. To get the access token for the new API, you can call the end point "/login" on https://api.extremecloudiq.com. Once you get the access code, you use it as part of the Bearer Authorization header when calling other API endpoints. The following are examples.
Login to get the access code:
curl -X POST "https://api.extremecloudiq.com/login" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"username\":\"${USERNAME}\",\"password\":\"${PASSWORD}\"}"
List the admin users with the access code:
curl -X GET "https://api.extremecloudiq.com/users?page=1&limit=10" -H "accept: application/json" -H "Authorization: Bearer ${ACCESS_CODE}"
You can test the New API on the following Swagger site directly.
https://api.extremecloudiq.com/swagger-ui/index.html?configUrl=/openapi/swagger-config#/
References:
https://extremecloudiq.com/api-docs/api-docs.html#_authentication
https://developer.extremecloudiq.com/​
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
‎01-06-2022 02:09 AM
@gabriel baima,
The token you got from XIQ Global Setting page is for old API only. To get the access token for the new API, you can call the end point "/login" on https://api.extremecloudiq.com. Once you get the access code, you use it as part of the Bearer Authorization header when calling other API endpoints. The following are examples.
Login to get the access code:
List the admin users with the access code:
You can test the New API on the following Swagger site directly.
https://api.extremecloudiq.com/swagger-ui/index.html?configUrl=/openapi/swagger-config#/
References:
https://extremecloudiq.com/api-docs/api-docs.html#_authentication
https://developer.extremecloudiq.com/​
The token you got from XIQ Global Setting page is for old API only. To get the access token for the new API, you can call the end point "/login" on https://api.extremecloudiq.com. Once you get the access code, you use it as part of the Bearer Authorization header when calling other API endpoints. The following are examples.
Login to get the access code:
curl -X POST "https://api.extremecloudiq.com/login" -H "accept: application/json" -H "Content-Type: application/json" -d "{\"username\":\"${USERNAME}\",\"password\":\"${PASSWORD}\"}"
List the admin users with the access code:
curl -X GET "https://api.extremecloudiq.com/users?page=1&limit=10" -H "accept: application/json" -H "Authorization: Bearer ${ACCESS_CODE}"
You can test the New API on the following Swagger site directly.
https://api.extremecloudiq.com/swagger-ui/index.html?configUrl=/openapi/swagger-config#/
References:
https://extremecloudiq.com/api-docs/api-docs.html#_authentication
https://developer.extremecloudiq.com/​
