Skip to main content
POST
/
gateway
/
auth
/
refresh
Refresh Token
curl --request POST \
  --url https://api.discountdrugnetwork.com/gateway/auth/refresh \
  --header 'Content-Type: application/json' \
  --header 'x-ddn-client-key: <api-key>' \
  --data '
{
  "refreshToken": "8joiu..."
}
'
{
  "accessToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
  "refreshToken": "9klmn...",
  "expiresIn": 3600,
  "tokenType": "Bearer"
}

Endpoint

POST https://api.discountdrugnetwork.com/gateway/auth/refresh

Input Parameters

No specific input parameters are required for this endpoint.

Authorizations

x-ddn-client-key
string
header
required

Body

application/json

Provide the refresh token to renew the authentication session.

refreshToken
string

The refresh token obtained during login.

Example:

"8joiu..."

Response

Token refreshed successfully

accessToken
string

The renewed JWT Authentication token to use in the Authorization Bearer header for future requests.

Example:

"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

refreshToken
string

The new refresh token for extending the authentication session.

Example:

"9klmn..."

expiresIn
integer

Number of seconds before the new token expires.

Example:

3600

tokenType
string

Identifies the type of token. Typically, this will be 'Bearer'.

Example:

"Bearer"