Appearance
Generate a token
About 187 wordsLess than 1 minute
apiAuthenticationToken
2025-03-13
MethodPOST
Request URL
/plugin/datafor-modeler/api/token/generate
Authorization
Use of this API requires authentication. For details about the authentication method, see
Authorization.
Content Typeapplication/x-www-form-urlencoded
Preconditions
- The current user's user type must be
Administrator
.
Parameters
name: ERP
privateKey: abcd
username: admin
Name | Location | Type | Required | Description |
---|---|---|---|---|
body | body | object | no | The main data object for generating the token. |
├── name | body | string | no | Name of the token. |
├── privateKey | body | string | no | Private key associated with the token. |
├── username | body | string | no | Username for token generation. |
Response Examples
{
"success": true,
"expire": 86400,
"token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJFUlAiOiJhZG1pbiIsImV4cCI6MTcyMzAxNTkxNn0.uEmUwBfNAd5FtzjPPrldU9bierng7fd8rCVlZtVPY2k"
}
HTTP Responses
HTTP Status Code | Meaning | Description | Data schema |
---|---|---|---|
200 | OK | The request was successful. | Inline |
Response Data Schema (HTTP 200)
Name | Type | Required | Restrictions | Description |
---|---|---|---|---|
success | boolean | Yes | none | Indicates if the token generation was successful (true or false ). |
expire | integer | Yes | none | The token's expiration time in seconds. |
token | string | Yes | none | The generated token string. |