Previous Next
(docx) HP Shipping Service API - Technical documentation (pdf)

3.Authorization – DX_Security_WebAPI

 
To access the DXWebAPI service, it is necessary to make an authorization process by calling service:

  • DX_Security_WebAPI

 
DX_Security_WebAPI gives a bearer token as a response which must then be inserted into the header of the DXWebAPI service call.
 
Bearer token duration is 4 hours.
 
For calling DX_Security_WebAPI service you will need:

  • username
  • password

provided by Hrvatska pošta d.d..

Method URL example - TEST
POST https://dxwebapit.posta.hr:9000/api/authentication/client_auth

 
Request example:

{
    "username": "string",
    "password": "string"
}
 

 
Response example:

{
    "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJDRUNPREUiOiI2NzU5ODQiLCJuYmYiOjE2NjkyOTU1ODgsImV4cCI6MTY2OTMwOTk4OCwiaWF0IjoxNjY5Mjk1NTg4fQ.Gq0jwJNDfMH0KOSXpkYGBeMpNILtksVYXtTx4OVwcLw",
    "expiresIn": "14400"
}
 

 

Response parameters

Parameter Type Description
accessToken String Bearer token
expiresIn Integer Bearer token duration in seconds