Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

« Previous Version 19 Next »

Table of Contents

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

RELEASED

April 10, 2024

V1.0.1

UAT

RELEASED

April 17, 2024

V1.0.1

PROD

RELEASED

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

string(36)

API key value associate with a User + Business Account

GrantType

string

api_key

ClientId

string(36)

System / App / Platform unique identifier

ClientSecret

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

POST /public/v2/connect/token

Body

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

Response

200 Success

{
    "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
}

400 Unauthorized

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

  • No labels