cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Get a bearer token from UAS for REST API call

oguimard
Retired

Before making any call to a REST API in HOPEX you need to get an authentication bearer token. This token will allow you to access the data based on your credentials. Prior to continue make sure you have at leat the there following information :

  • the login of the user
  • the password of the user
  • the absolute idenfier of the environment you want to access to.

To get a token make a REST API call to the following URL

https://<<my server here>>/UAS/connect/token

 

You can make this call with a tool like Postman for instance. the request will be a POST request to which you will provide a set of parameters in the body.

 

Selection for the body option : x-www-form-urlencoded

 

The parametes for the body are :

grant_type: password
scope:hopex openid read write offline_access
username:<<my hopex login here>>
password:<<my hopex password here>>
client_id:HopexAPI
client_secret:secret
environmentId:<<my hopex environment absolute identifier>>

 

Need to know how to get the environmentID ? Read this post

 

Some of the option can be different than in this example depending on the installation option you have done.

 

Body Response format :

{
"access_token": "9f6ccf75bafa2c84a507842174205f8b",
"expires_in": 3600,
"token_type": "Bearer"
}

 

To get an detailed explaination watch the following video

 

More from the documentation click here

 

0 Replies