Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Table of Contents
stylenone

Changelogs

Version

Date

Changes by

Description of change

V1.0

Mar 29, 2024

Que Nguyen

  • Add Table of Contents.

  • Add Changelogs.

V1.0.1

April 10, 2024

Que Nguyen

  • Add Release Status table.

  • Update RefreshToken into Response.Data

Release Status

Environment

Status

Released Date

Version

DEV

Status
colourGreen
titleReleased

April 10, 2024

V1.0.1

UAT

Status
colourGreen
titleRELEASED

April 17, 2024

V1.0.1

PROD

Status
colourGreen
titleRELEASED

Mar 25, 2024

V1.0

API Definitions

Get Access Token

Resource information

Response format(s)

JSON

Requires authentication?

No

Request Header

Name

Value

Content-Type

application/json

Request Body

ApiKey

  • required

  • string(36)

API key value associate with a User + Business Account

GrantType

  • required

  • string

api_key

ClientId

  • required

  • string(36)

System / App / Platform unique identifier

ClientSecret

  • required

  • string(36)

System / App / Platform secret

Returns

Returns a message with status code.

Response Header

Content-Type

application/json

Response Body

Field

Type

Description

AccessToken

string

User access token

Token life time: https://redex-eco.atlassian.net/wiki/spaces/PAD/pages/286490675/Authentication#Access-Token%3A

RefreshToken

string

User refresh token. Using in API “GET Refresh Token”

Token life time: https://redex-eco.atlassian.net/wiki/spaces/PAD/pages/286490675/Authentication#Refresh-Token%3A

ExpiresIn

int

Token’s expired time in second

TokenType

string

Type Identifier

Scope

string

Collection of scopes granted for this user access token.

Request

Status
colourGreen
titlePOST
/public/v2/connect/token

Body

Code Block
languagejson
{
  "ApiKey": "4d7869f0-71cc-43d8-8b82-1f87db6eda2f",
  "GrantType": "api_key",
  "ClientId": "3Yj1rQvcDGYXqXtaxDNyWaNkWPUAwJ",
  "ClientSecret": "fNDq3vGM26wzOqr9OMUXQkxdG5J3$o"
}

Response

Info

200 Success

Code Block
languagejson
{
    "Data": {
        "AccessToken": {{AccessToken}},
        "RefreshToken": {{RefreshToken}},
        "ExpiresIn": "3600",
        "TokenType": "Bearer",
        "Scope": "REConnect_api REDEX_api REHash_api"
    },
    "Errors": null,
    "StatusCode": 200,
    "Message": "Return tokens successfully",
    "Meta": null
}

Warning

400 Unauthorized

Code Block
languagejson
{
    "Data": null,
    "Errors": [
        {
            "Key": "unsupported_grant_type",
            "Message": "unsupported_grant_type"
        }
    ],
    "StatusCode": 400,
    "Message": "unsupported_grant_type",
    "Meta": null
}