BioloMICS logo
×
BioloMICS Web Menu

How to get the authorization token for the webservice

 
 
Important links:
 
  • Admin section API (where is the yaml file):
  • https://webservices.bio-aware.com/ WEBSERVICE_BASE_PATH/admin/login
     
  • Public section API (where one can do the requests):
  • https://webservices.bio-aware.com/ WEBSERVICE_BASE_PATH/public
     
  • Postman software
 
 
Steps to take:
 
  • Get token for the first time
 
  • Go to admin section of the API and find the ClientID in the security section of the yaml file. This value is needed in a later step.
     
  • Open the postman software and login.
     
  • Click on the + icon to add a new tab.

     
  • Set the type to POST and enter the link for the token.
    https://webservices.bio-aware.com/ WEBSERVICE_BASE_PATH/connect/token
     
  • Go to the Body tab and check x-www-form-urlencoded.

     
  • Enter the following 4 lines:
     
  • grant_type     password
  • username     email address of the account in BioloMICS
  • password     password of the account in BioloMICS
  • client_id     taken from the yaml file in the admin section of the API

     
  • Click on the Send button.
     
  • The results are shown at the bottom, and the token can be copied. (Copy it without the “”).
     
     
  • Use obtained token
     
  • Go to the public section of the API:  https://webservices.bio-aware.com/ WEBSERVICE_BASE_PATH/public
     
  • Open a GET.
     
  • Click on the Test request button.

     
  • In the Headers section add a new line.
     
  • Call it (on the left) Authorization.
     
  • Put in the value of that line first “Bearer “ and then paste the obtained token from postman.

     
  • Then click on the Send button and the results will be displayed.
     
     
  • Get a new access token (when previous one was expired)
     
  • In postman, duplicate the last used tab.

     
  • Go to Body.
     
  • Change the value of the grant_type to: refresh_token
  • Uncheck the username and the password.
  • Add new line refresh_token and add the refresh token that was given in the previous request in postman (other tab should still be open).


     
  • Click Send and the new token can be used again.