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 |
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.
// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.WelfareApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
WelfareApi apiInstance = new WelfareApi(defaultClient);
try {
ApiResponseExSkillGetUserIdentityResp result = apiInstance.getUserIdentity();
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling WelfareApi#getUserIdentity");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}This endpoint does not need any parameter.
ApiResponseExSkillGetUserIdentityResp
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The endpoint always returns HTTP 200. Business results are distinguished by the code field | - |
| 400 | Invalid request parameters | - |
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.
// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.WelfareApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
WelfareApi apiInstance = new WelfareApi(defaultClient);
try {
ApiResponseExSkillGetBeginnerTaskListResp result = apiInstance.getBeginnerTaskList();
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling WelfareApi#getBeginnerTaskList");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}This endpoint does not need any parameter.
ApiResponseExSkillGetBeginnerTaskListResp
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The endpoint always returns HTTP 200. Business results are distinguished by the code field | - |
| 400 | Invalid request parameters | - |
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
// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.WelfareApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
WelfareApi apiInstance = new WelfareApi(defaultClient);
ExSkillClaimTaskReq exSkillClaimTaskReq = new ExSkillClaimTaskReq(); // ExSkillClaimTaskReq |
try {
ApiResponseExSkillClaimTaskResp result = apiInstance.claimTask(exSkillClaimTaskReq);
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling WelfareApi#claimTask");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| exSkillClaimTaskReq | ExSkillClaimTaskReq |
ApiResponseExSkillClaimTaskResp
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The endpoint always returns HTTP 200. Business results are distinguished by the code field | - |
| 400 | Invalid request parameters | - |
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
// Import classes:
import io.gate.gateapi.ApiClient;
import io.gate.gateapi.ApiException;
import io.gate.gateapi.Configuration;
import io.gate.gateapi.GateApiException;
import io.gate.gateapi.auth.*;
import io.gate.gateapi.models.*;
import io.gate.gateapi.api.WelfareApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://api.gateio.ws/api/v4");
// Configure APIv4 authorization: apiv4
defaultClient.setApiKeySecret("YOUR_API_KEY", "YOUR_API_SECRET");
WelfareApi apiInstance = new WelfareApi(defaultClient);
ExSkillClaimRewardReq exSkillClaimRewardReq = new ExSkillClaimRewardReq(); // ExSkillClaimRewardReq |
try {
ApiResponseExSkillClaimRewardResp result = apiInstance.claimReward(exSkillClaimRewardReq);
System.out.println(result);
} catch (GateApiException e) {
System.err.println(String.format("Gate api exception, label: %s, message: %s", e.getErrorLabel(), e.getMessage()));
e.printStackTrace();
} catch (ApiException e) {
System.err.println("Exception when calling WelfareApi#claimReward");
System.err.println("Status code: " + e.getCode());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}| Name | Type | Description | Notes |
|---|---|---|---|
| exSkillClaimRewardReq | ExSkillClaimRewardReq |
ApiResponseExSkillClaimRewardResp
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | The endpoint always returns HTTP 200. Business results are distinguished by the code field | - |
| 400 | Invalid request parameters | - |