All URIs are relative to https://api.gateio.ws/api/v4
| Method | HTTP request | Description |
|---|---|---|
| getUserIdentity | GET /rewards/getUserIdentity | Get user identity |
| getBeginnerTaskList | GET /rewards/getBeginnerTaskList | Get beginner task list |
| claimTask | POST /rewards/claimTask | Get the task |
| claimReward | POST /rewards/claimReward | Receive mission rewards |
Promise<{ response: http.IncomingMessage; body: ApiResponseExSkillGetUserIdentityResp; }> getUserIdentity()
Get user identity
Validate whether the user is eligible for new user rewards. Returns the corresponding error code on validation failure, data is an empty object on success.
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.WelfareApi(client);
api.getUserIdentity()
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));This endpoint does not need any parameter.
Promise<{ response: AxiosResponse; body: ApiResponseExSkillGetUserIdentityResp; }> ApiResponseExSkillGetUserIdentityResp
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: ApiResponseExSkillGetBeginnerTaskListResp; }> getBeginnerTaskList()
Get beginner task list
Get the current user's onboarding task list. By default, the registration tasks (type=10) and guidance tasks (type=11) that have been assigned to the current user are returned. The registration tasks are ranked first and the guidance tasks are ranked behind. When the user does not have a download task and the system determines that the user has not downloaded the app, a "Download task to be received" card will be dynamically added. Among them: - `task_type = 23` for download tasks - `status = 0` for download tasks to be collected Results are cached for 60 seconds. Task lists are limited in number (usually no more than 10) and do not require pagination.
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.WelfareApi(client);
api.getBeginnerTaskList()
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));This endpoint does not need any parameter.
Promise<{ response: AxiosResponse; body: ApiResponseExSkillGetBeginnerTaskListResp; }> ApiResponseExSkillGetBeginnerTaskListResp
- Content-Type: Not defined
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: ApiResponseExSkillClaimTaskResp; }> claimTask(exSkillClaimTaskReq)
Get the task
Receive a single welfare task. The current main scene is for new customer download tasks to be collected, but the interface itself supports new customer registration, guidance, and advanced task types. Processing flow: 1. Read the logged in user 2. Verify user qualifications 3. Risk control verification (event code `task_center`) 4. Verify task configuration and task center tasks 5. Verify whether there is an ongoing task 6. If it is a download task, verify whether the App has been downloaded 7. Write `welfare_user_tasks_xx` 8. Report to task center Risk control transparent transmission fields: - Old fields: `user_id`, `ip`, `const_id`, `is_async`, `action`, `task_id` - New fields: `req_method`, `traceid` - Among them: - `req_method` from `X-Gate-Request-Source` - `ip` from `X-Gate-Ip` - `traceid` from `X-Gate-Trace-Id` - `const_id` is fixed to an empty string
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.WelfareApi(client);
const exSkillClaimTaskReq = new ExSkillClaimTaskReq(); // ExSkillClaimTaskReq |
api.claimTask(exSkillClaimTaskReq)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| exSkillClaimTaskReq | ExSkillClaimTaskReq |
Promise<{ response: AxiosResponse; body: ApiResponseExSkillClaimTaskResp; }> ApiResponseExSkillClaimTaskResp
- Content-Type: application/json
- Accept: application/json
Promise<{ response: http.IncomingMessage; body: ApiResponseExSkillClaimRewardResp; }> claimReward(exSkillClaimRewardReq)
Receive mission rewards
Receive rewards from a single welfare task. Processing flow: 1. Read the logged in user 2. Verify user qualifications 3. Query `welfare_user_tasks_xx` and require the task status to be `StatusDone(2)` 4. Risk control verification (event code `index_page_check`) 5. Query task details and reward information in the task center 6. If the reward is m and n is selected from the prize pool, then `has_m_n_task = true` will be returned and the reward will not be actually issued. 7. Ordinary rewards will enter the original reward collection logic of the Welfare Center Risk control transparent transmission fields: - Old fields: `user_id`, `ip`, `const_id`, `is_async` - New fields: `req_method`, `traceid` - Among them: - `req_method` from `X-Gate-Request-Source` - `ip` from `X-Gate-Ip` - `traceid` from `X-Gate-Trace-Id` - `const_id` is fixed to an empty string
const GateApi = require('gate-api');
const client = new GateApi.ApiClient();
// uncomment the next line to change base path
// client.basePath = "https://some-other-host"
// Configure Gate APIv4 key authentication:
client.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
const api = new GateApi.WelfareApi(client);
const exSkillClaimRewardReq = new ExSkillClaimRewardReq(); // ExSkillClaimRewardReq |
api.claimReward(exSkillClaimRewardReq)
.then(value => console.log('API called successfully. Returned data: ', value.body),
error => console.error(error));| Name | Type | Description | Notes |
|---|---|---|---|
| exSkillClaimRewardReq | ExSkillClaimRewardReq |
Promise<{ response: AxiosResponse; body: ApiResponseExSkillClaimRewardResp; }> ApiResponseExSkillClaimRewardResp
- Content-Type: application/json
- Accept: application/json