Ad endpoints
info
these are endpoints relating to the system
tip
How to format checkpoint urls:
Callback url:
https://ads.luaauth.com/verify/{CALLBACK_ID}
Postback url:
https://ads.luaauth.com/postback/{POSTBACK_ID}
Getting provider info
GET
/ads/providers
Response
- Success
{
"success": true,
"providers": {
"PROVIDER_NAME": [{
"id": "SETTING_ID",
"name": "SETTING_NAME",
"type": "toggle" OR "text" OR "info",
"info": "SETTING_INFO"
}]
}
}
Creating a new system
POST
/ads/systems/new
Body
| Name | Type | Nullable | Default | Description |
|---|---|---|---|---|
| project_id | String | ❌ | Project system should use | |
| name | String | ❌ | Name for the system | |
| key_duration | Number | ✅ | 86400000 | Key duration given for completing the system |
| max_keys | Number | ✅ | 1 | Max keys allowed per system user |
| allow_extending | Boolean | ✅ | True | Allow users to extend their keys duration |
| max_duration | Number | ✅ | 604800000 | Max duration a users key is allowed to be extended to |
Response
- Success
- Error
{
"success": true,
"system_id": "SYSTEM_ID"
}
| Code | Message |
|---|---|
| 0 | max systems reached |
| 1 | account expired |
| 2 | cannot use this project |
Getting systems
GET
/ads/systems
Response
- Success
{
"success": true,
"systems": [{
"id": "SYSTEM_ID",
"project_id": "PROJECT_ID",
"name": "SYSTEM_NAME",
"key_duration": 86400000,
"max_keys": 1,
"allow_extending": true,
"max_duration": 604800000
}]
}
Getting system info
GET
/ads/systems/:system_id
Parameters
| Name | Type | Description |
|---|---|---|
| system_id | String | The systems id |
Response
- Success
{
"success": true,
"system": {
"id": "SYSTEM_ID",
"project_id": "PROJECT_ID",
"name": "SYSTEM_NAME",
"key_duration": 86400000,
"max_keys": 1,
"allow_extending": true,
"max_duration": 604800000
}
}
Editing a system
POST
/ads/systems/:system_id/edit
Parameters
| Name | Type | Description |
|---|---|---|
| system_id | String | The systems id |
Body
| Name | Type | Nullable | Description |
|---|---|---|---|
| project_id | String | ✅ | Project system should use |
| name | String | ✅ | Name for the system |
| key_duration | Number | ✅ | Key duration given for completing the system |
| max_keys | Number | ✅ | Max keys allowed per system user |
| allow_extending | Boolean | ✅ | Allow users to extend their keys duration |
| max_duration | Number | ✅ | Max duration a users key is allowed to be extended to |
Response
- Success
- Error
{ "success": true }
| Code | Message |
|---|---|
| 0 | account expired |
| 1 | cannot use this project |
| 2 | cannot edit nothing |
Setting a systems custom url
POST
/ads/systems/:system_id/url
Parameters
| Name | Type | Description |
|---|---|---|
| system_id | String | The systems id |
Body
| Name | Type | Nullable | Description |
|---|---|---|---|
| url | String | ❌ | Custom url to use (A-Z, a-z, 0-9, _ and - allowed only) |
Response
- Success
- Error
{ "success": true }
| Code | Message |
|---|---|
| 0 | account expired |
| 1 | tier does not allow custom ad urls |
| 2 | custom url already taken |
Deleting a system
POST
/ads/systems/:system_id/remove
Parameters
| Name | Type | Description |
|---|---|---|
| system_id | String | The systems id |
Response
- Success
{ "success": true }
Getting checkpoints
GET
/ads/systems/:system_id/checkpoints
Parameters
| Name | Type | Description |
|---|---|---|
| system_id | String | The systems id |
Response
- Success
{
"success": true,
"checkpoints": [{
"id": "CHECKPOINT_ID",
"system_id": "SYSTEM_ID",
"name": "CHECKPOINT_NAME",
"url": "PROVIDER_URL",
"index": 0,
"provider": "linkvertise" OR "lootlabs" OR "work.ink",
"provider_data": {
"SETTING_ID": "SETTING_VALUE" // check provider info endpoint for this
},
"callback_id": "CALLBACK_ID",
"total_completed": 0,
"total_failed": 0,
"average_time_taken": 0 // ms
}]
}
Preparing a new checkpoint
POST
/ads/systems/:system_id/checkpoints/prepare
info
you must do this request before you can create a new checkpoint
Parameters
| Name | Type | Description |
|---|---|---|
| system_id | String | The systems id |
Response
- Success
{
"success": true,
"id": "CHECKPOINT_ID",
"callback_id": "CALLBACK_ID"
}
Creating a new checkpoint
POST
/ads/systems/:system_id/checkpoints/new
Parameters
| Name | Type | Description |
|---|---|---|
| system_id | String | The systems id |
Body
| Name | Type | Options | Nullable | Description |
|---|---|---|---|---|
| name | String | ❌ | Name for the checkpoint | |
| url | String | ❌ | Url for the checkpoint given by your provider | |
| provider | Enum | 'linkvertise' OR 'lootlabs' OR 'work.ink' | ❌ | Provider your using for this checkpoint |
| provider_data | JSON | ❌ | Provider specific data for this checkpoint |
Response
- Success
- Error
{
"success": true,
"checkpoint_id": "CHECKPOINT_ID",
"postback_id": "POSTBACK_ID" OR null
}
| Code | Message |
|---|---|
| 0 | provider data {SETTING_ID} cannot be changed provider data {SETTING_ID} cannot be null provider data {SETTING_ID} required for {SETTING_IDS} provider data {SETTING_ID} is not a {TYPE} |
| 1 | no checkpoints prepared yet |
| 2 | max checkpoints reached |
| 3 | account expired |
| 4 | max checkpoints reached for this system |
| 5 | invalid url provided |
Getting checkpoint info
GET
/ads/checkpoints/:checkpoint_id
Parameters
| Name | Type | Description |
|---|---|---|
| checkpoint_id | String | The checkpoints id |
Response
- Success
{
"success": true,
"checkpoint": {
"id": "CHECKPOINT_ID",
"system_id": "SYSTEM_ID",
"name": "CHECKPOINT_NAME",
"url": "PROVIDER_URL",
"index": 0,
"provider": "linkvertise" OR "lootlabs" OR "work.ink",
"provider_data": {
"SETTING_ID": "SETTING_VALUE" // check provider info endpoint for this
},
"callback_id": "CALLBACK_ID",
"total_completed": 0,
"total_failed": 0,
"average_time_taken": 0 // ms
}
}
Editing a checkpoint
POST
/ads/checkpoints/:checkpoint_id/edit
Parameters
| Name | Type | Description |
|---|---|---|
| checkpoint_id | String | The checkpoints id |
Body
| Name | Type | Options | Nullable | Description |
|---|---|---|---|---|
| name | String | ✅ | Name for the checkpoint | |
| url | String | ✅ | Url for the checkpoint given by your provider | |
| provider | Enum | 'linkvertise' OR 'lootlabs' OR 'work.ink' | ✅ | Provider your using for this checkpoint |
| provider_data | JSON | ✅ | Provider specific data for this checkpoint |
Response
- Success
- Error
{
"success": true,
"postback_id": "POSTBACK_ID" OR null
}
| Code | Message |
|---|---|
| 0 | provider data {SETTING_ID} cannot be changed provider data {SETTING_ID} cannot be null provider data {SETTING_ID} required for {SETTING_IDS} provider data {SETTING_ID} is not a {TYPE} |
| 1 | account expired |
| 2 | invalid url provided |
| 3 | cannot edit nothing |
Swapping checkpoints
POST
/ads/checkpoints/:checkpoint_id/swap
Parameters
| Name | Type | Description |
|---|---|---|
| checkpoint_id | String | The checkpoints id |
Body
| Name | Type | Nullable | Description |
|---|---|---|---|
| index | Number | ❌ | Index to swap with |
Response
- Success
- Error
{ "success": true }
| Code | Message |
|---|---|
| 0 | account expired |
| 1 | must give a valid index to swap with |
Deleting a checkpoint
POST
/ads/checkpoints/:checkpoint_id/remove
Parameters
| Name | Type | Description |
|---|---|---|
| checkpoint_id | String | The checkpoints id |
Response
- Success
{ "success": true }