Get User Game Token

Retrieve the token used by the user in games on the OMG platform.This interface will generate a new player authentication token. The generated token is valid for seven days. After seven days, you can

Authorize

This API is provided by the OMG platform and is called by the integrator.

POST {OMG_API_URL}/api/player/v1/authorize?trace_id=your_trace_id

{OMG_API_URL} is the OMG API domain, which can be obtained from the backend.

Headers

Name
Value

Content-Type

"application/json; charset=utf-8"

sign

"your_sign_string"

Please refer to the Signature Algorithm and Example page for details on the signature algorithm.

Body

Name
Type
Description

app_id

string

The unique identifier for the merchant, available in the merchant backend.

uname

string

User ID must be unique

nickname

string

User's Nickname

timestamp

integer

Timestamp (in seconds)

cid

integer optional

Currency ID. Required for multi-currency merchants and can be found in the multi-currency backend under the "API Access" section to view available currency IDs. For single-currency merchants, simply pass

Integrator Request Parameter Example

OMG Platform Response Parameter Example

Response Example Parameter Descriptions

Name
Required
Type
Description

code

Yes

integer

Status Code

msg

Yes

string

Message

data

Yes

object

Response Data

token

Yes

string

User Token In OMG Game

balance

Yes

string (decimal)

User Balance, supports up to 4 decimal places.

app_id

Yes

string

The app_id of the merchant to which the player belongs

Error Code

For more error codes, please refer to the General Error Codes page description.

Last updated