Praneat Game Campaign (0.1.1)

Download OpenAPI specification:Download

Praneat Developer: [email protected] License: © PRANEAT Co., Ltd.

Example API Document

Authentication

Everything about "Authentication"

Redirect to auth login kit

After redirecting to the auth login kit, the user must first log in. After successful login, auth server will return an authCode query string to the specified callback URL.
After that authCode can then be used to make a [POST] request to /auth/token and will response accessToken that use for HTTP authorization.

query Parameters
callbackUrl
required
string
Example: callbackUrl=https://shop.praneat.com/product?category=1

Return callbackUrl with authCode

Responses

Response samples

Content type
text/html
<html><body><button>เข้าสู่ระบบสมาชิก Praneat Shop</button></body></html>

Create access & refresh token

Create access & refresh token by authentication code

Authorizations:
ApiKeyAuth
Request Body schema: application/json
authCode
required
string

Responses

Request samples

Content type
application/json
{
  • "authCode": "N7laOeemkwHK9f8E3VBAvXfXjZwAF64"
}

Response samples

Content type
application/json
{
  • "statusCode": 200,
  • "message": "Success",
  • "data": {
    }
}

Renew access token

Send refresh token to get new access token

Authorizations:
(BearerAuthApiKeyAuth)
Request Body schema: application/json
refreshToken
required
string

Responses

Request samples

Content type
application/json
{
  • "refreshToken": "1d1021d2aee3d41fee2d2add43456badMFZnrhFhfWotu3Ecuiuka27L56lr"
}

Response samples

Content type
application/json
{
  • "statusCode": 200,
  • "message": "Success",
  • "data": {
    }
}

Verify access token

Verify access token is valid, a backend to backend token verification process can be used. This involves checking the token against the authentication server to ensure that it is still valid and has not expired.

Authorizations:
ApiKeyAuth
Request Body schema: application/json
accessToken
required
string

Responses

Request samples

Content type
application/json
{
  • "accessToken": "1d1021d2aee3d41fee2d2add43456badMFZnrhFhfWotu3Ecuiuka27L56lr"
}

Response samples

Content type
application/json
{
  • "statusCode": 200,
  • "message": "Success"
}

Logout

Revoke all tokens when user logout & disconnect the connection between your website and auth server

Authorizations:
(BearerAuthApiKeyAuth)

Responses

Response samples

Content type
application/json
{
  • "statusCode": 200,
  • "message": "Success"
}

Profile

ทั้งหมดที่เกี่ยวข้องกับข้อมูล User เช่น get user profile

Get user profile

Get user data e.g. uuid, name, phone, email, point

Authorizations:
(BearerAuthApiKeyAuth)

Responses

Response samples

Content type
application/json
{}

Point

ทั้งหมด ที่เกี่ยวข้องกับการ นับคะแนน

Update user point

Send a point that user earn/burn and then return a latest summary point of user to client

Authorizations:
(BearerAuthApiKeyAuth)
Request Body schema: application/json
point
required
integer <int32>

Point that user earn/burn from each source

source
required
string
Enum: "MiniGame1" "Minigame2" "Minigame3" "Minigame4" "DailyLogin" "Tutorial"

Source of earn/burn point

actionAt
required
integer <int64>

Unix timestamp of user's source action

Responses

Request samples

Content type
application/json
{
  • "point": 99,
  • "source": "MiniGame1",
  • "actionAt": 1684894582
}

Response samples

Content type
application/json
{
  • "statusCode": 200,
  • "message": "Success",
  • "data": {
    }
}