Method to Get Token
Here’s how to get an access token.Prerequisites
You have obtainedappKey
and appId
, which can be found in the created API Keys.
Steps
- Generate a signature using appKey and appId.
- Use the signature as the input parameter for the init method of the h5 sdk.
Signature Generation
The signature uses the JWT mechanism. Users can refer to the following to complete the signature.Parameter Description
The following parameters need to be prepared for signature generationName | Type | Description | Example |
---|---|---|---|
appId | string | Session identifier, obtained after successful session creation | xxxxxxx |
appKey | string | Session key, obtained after successful session creation | xxxxxxx |
sigExp | Integer | Signature validity time, in seconds | 1800 |