EcoStruxure IT forum
Schneider Electric support forum about installation and configuration for DCIM including EcoStruxure IT Expert, IT Advisor, Data Center Expert, and NetBotz
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-19 12:05 AM
How can I generate token for ITA rest API authentication? How to use the token in API requests?
I tried using /authentication with username and password and generated a token. However, it showed Unauthorized when using this token in the following request. Are there any example how it should be used?
Thanks!
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-22 07:10 AM
Hi @www021,
I don't have much ITA RestAPI experience, but I was able to do some testing and get a token to work following the details listed in the "authentication: Authentication Service" "POST /authentication" section of the rest API documentation.
You can start by doing a call to get the token using the modelschema that contains the username and password:
When you click on the Try it out button you will receive a "token" within the response body.
You can use this token in the header field of other calls with the http header name of "Authorization" and the value being "bearer {insert_token_here}"
When you run an acceptable call, the call should execute and display results:
Kind Regards,
Cory
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-05-22 07:10 AM
Hi @www021,
I don't have much ITA RestAPI experience, but I was able to do some testing and get a token to work following the details listed in the "authentication: Authentication Service" "POST /authentication" section of the rest API documentation.
You can start by doing a call to get the token using the modelschema that contains the username and password:
When you click on the Try it out button you will receive a "token" within the response body.
You can use this token in the header field of other calls with the http header name of "Authorization" and the value being "bearer {insert_token_here}"
When you run an acceptable call, the call should execute and display results:
Kind Regards,
Cory
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-12-05 12:07 PM
Found out the hard way that the word 'bearer' CANNOT be capitalized (ie do not use 'Bearer') or it will fail.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.