Identity (v4)

Download OpenAPI specification:

Suratchanee Supphaatthasitt: suratchanee.sup@truedigital.com

Identity API Allowing any person to be uniquely and easily authorized to transparently manage his account, with all necessary credentials and devices, and consents to delegate processing of his/her information and transactions as safely as the user desires.

Accounts

APIs to manage account

Display my account information (login and contacts info)

< Provides basic information to find and identify the account (e.g. to establish relationships)

Authorizations:
apiKey
path Parameters
id
required
integer

A unique identifier the account (aka. SSOID)

header Parameters
Authorization
required
string
Example: 5cc953b97d5a1df61c25082c1b5ce1c18fc94ccf94596ca3520abcde

API Key

access_token
required
string
Example: eyJraWQiOiJjNGNhNDIzOGEwYjkyMzgyMGRjYzUwOWE2Zjc1ODQ5YiIsImFsZyI6IlJTMjU2In0.eyJzdWIiOiIyMTk5MjA0MCIsImRldmljZV9pZCI6IjEyMzQ1Njc4IiwicHJvZmlsZSI6eyJyZWZzIjpudWxsLCJhdmF0YXIiOiJodHRwczpcL1wvc3RnLWF2YXRhci5kbXBjZG4uY29tXC9wMzIweDMyMFwvNDBcLzIxOTkyMDQwLnBuZz9jaGs9MC45NTg1MjU4Nzk1OTgzMzY4IiwiZGlzcGxheV9uYW1lIjoiMDgxKioqKioqKiJ9LCJpc3MiOiJodHRwczpcL1wvc2RrLWF1dGgudHJ1ZWlkLWRldi5uZXQiLCJhcGltX2FuIjoiVElEYW4iLCJ2ZXJzaW9uIjoiMi4wIiwiYXVkIjoiMzQ5MSIsInNjb3BlIjoicHVibGljX3Byb2ZpbGUiLCJleHAiOjE2MTI3NjA2NjEsImlhdCI6MTYxMjc1NzA2MSwidHJ1c3RlZF9vd25lciI6IjEiLCJ0emUiOnsidGltZXpvbmUiOiJVVEMiLCJ2YWx1ZSI6IjAiLCJnbXQiOiIrMDAwMCJ9LCJhcGltX3BvIjoiNWIyY2MzYzdhMGU2MjE1MGQxOTUyNDBjIn0.y77S100wPWuILERMvliNq31Gxg1tRCLiFLaCEpSBJwVpST4LUFItgvxHVF-xkzxLr_12Rsri5KdOaw39nXhZyr3vTz73i2l_UBlV_NIygsGxMxnHQgHwOhuQKcgDydHuJyUXuJeq8kFt8QgnBcEbOS5tBCdCWGrSpM1c8yBsQlVy0ZFHaBRRqndCkSyfiK9jmyUZQyWj1cbw12TBIyp8lz5ArxMQkEZmKswp0rz4eQICGDPmF_fIBAW63k7lkp32BGJQhvjTf3wtX4_AttPPBZ9x_RzZgC71PD6nHUc5EHmIN8JWzm-6hdY0nBPRCvC0HxRx078k1c0ihwb37CoEfQ

Access token

client_id
required
integer
Example: 1331

Application client id

client_secret
required
string
Example: 607ed94fb933d775beabfd9xx00

Application client secret

Responses

Response samples

Content type
application/json
{
  • "code": 10001,
  • "message": "Success",
  • "platform_module": 1504,
  • "data": {
    }
}

Searching mobile/email account to check TrueID account

Searching mobile or email account to verify if this account already registered TrueID.

Indicate mobile or email account in header particularly sensitive data to avoid passing sensitive data in URL.

Authorizations:
apiKey
query Parameters
last_access_flag
any
Enum: "all" "app" "web" "stb"
Example: last_access_flag=all

Specific channel that need to get last access date;
all - response last access date of app/web/stb
app - response last access date of app
web - response last access date of web
stb - response last access date of stb

header Parameters
X-Client-Identifier
required
integer
Example: 2171

Application client id

X-Client-Secret
required
string
Example: 17e2236b665fadebe3c8d9515a0a6b19

Application client secret

X-Account-Identifier
required
string
Example: 0813487612

Account of customer that need to check TrueID account, this value can be mobile or email

Responses

Response samples

Content type
application/json
Example
{
  • "code": 10001,
  • "message": "Success",
  • "platform_module": 1510,
  • "report_dashboard": 0,
  • "data": [
    ]
}

Searches

APIs to check valid account

(obsolete) Deprecated

This API's obsolete, can use /accounts instead.

Authorizations:
apiKey
query Parameters
mobile
required
string
Example: mobile=0813487612

The account of customer

header Parameters
client_id
required
integer
Example: 2171

Application client id

client_secret
required
string
Example: 17e2236b665fadebe3c8d9515a0a6b19

Application client secret

Responses

Response samples

Content type
application/json
{
  • "dataReturn": {
    }
}

Tokens

APIs to change auth code to access token for Mobile ID project

To change authorization code to access token.

To change authorization code to access token.

Authorizations:
apiKey
header Parameters
Content-Type
required
string
Example: application/x-www-form-urlencoded

request header content type

Request Body schema: application/json
required
grant_type
required
string
Value: "authorization_code"

request for grant type.

client_id
required
string

The unique id for each relying party.

client_secret
required
string

The key for each client id.

request_id
required
string <= 50 characters

The request id generate by requestor for tracking.

code
required
string

The authrozation code for exchange to access token.

mobile_number
required
string

The mobile number for the customer with encryption.

redirect_url
string

The http endpoint for each relying party for redirection.

timestamp
required
string

The request or response time.

Responses

Request samples

Content type
application/json
{
  • "grant_type": "authorization_code",
  • "client_id": "1245",
  • "client_secret": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9",
  • "request_id": "927da5c1-0434-4eeb-b96e-fc3ec830e369",
  • "code": "nnqtYcoik7cjtHQYyn3Af8uk4LG3rYYh",
  • "mobile_number": "bT0xUV8M/hJ7ABdCk6iDhxxMhtyuuBQS8g/H6rvTmYQ=",
  • "redirect_url": "http://{rp_server}/xxxx",
  • "timestamp": "2020-11-11T11:59:54.003Z"
}

Response samples

Content type
application/json
Example
{
  • "res_code": "000",
  • "res_message": "Success.",
  • "request_id": "927da5c1-0434-4eeb-b96e-fc3ec830e369",
  • "mobile_number": "bT0xUV8M/hJ7ABdCk6iDhxxMhtyuuBQS8g/H6rvTmYQ=",
  • "access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
  • "token_type": "Bearer",
  • "expires_in": 3600,
  • "id_token": "uwrowjrijsfosUIIOJOfjskfjwofjs;afaOPosfjosfjsaofaiUUOa",
  • "timestamp": "2020-11-11T11:59:55.003Z"
}