|
You last visited: Today at 11:50
Advertisement
TBM API v2
Discussion on TBM API v2 within the General Coding forum part of the Coders Den category.
03/30/2022, 16:16
|
#1
|
Administrator
elite*gold: 26516
Join Date: May 2011
Posts: 21,003
Received Thanks: 2,346
|
TBM API v2
TBM API v2
With the help of the new API you now have the possibility to create more comprehensive applications for our Black Market than ever before.
A list of all current endpoints can be found below. Please note that for some endpoints there will be a request fee, which will be automatically deducted from your elite*gold balance.
Are you missing any features that you would like to have and that would fit well to the Black Market? Then please post your suggestions here:
All endpoints set the following parameters for authentication in addition to the mentioned endpoint-specific parameters:
Parameter: u (unsigned int) - This is your UserID that you have here on the forum.
Parameter: secretword (string) A secretword you set yourself - This is not your forum password! Your secretword can be set here:
All endpoints are also accessible via GET and POST and via a JSON payload (POST only, be sure to set Content-Type to application/json). Response will always be JSON.
elite*goldURL: 
Description:Shows you all transactions involving your account Fee: 0 elite*gold
Parameters:
| Name | Type | Required | Default | Description |
|---|
| type | string | No | all | Shows you only transaction of a certain type. Accepted: all,sent,received | | page | unsigned int | No | 1 | Shows you page X of the transactions. | | hide-reversed | boolean | No | false | Hides transactions that have been reversed. | Response:
Code:
{
"success": true,
"error": null,
"data": {
"page": {
"current": 1,
"count": 2
},
"transactions": [
{
"id": 1,
"from": {
"id": -1,
"name": "System"
},
"to": {
"id": 1,
"name": "admin"
},
"amount": 1560,
"note": "",
"timestamp": 1234512345,
"reversed": false
}
]
}
}
URL: 
Description:Send elite*gold to another user Fee: 1 elite*gold
Parameters:
| Name | Type | Required | Default | Description |
|---|
| to | unsigned int | Yes | | Userid of the recipient | | amount | unsigned int | Yes | | Amount of elite*gold you want to send to the user | | note | string | No | | Custom note for the transaction | Response:
Code:
{
"success": true,
"error": null,
"data": {
"id": 2,
"from": {
"id": 1,
"name": "admin"
},
"to": {
"id": 2,
"name": "co-admin"
},
"amount": 100,
"note": "I like you",
"timestamp": 1234512345,
"reversed": false
}
}
TreasuresURL: 
Description:Get treasures created or bought by your account Fee: 0 elite*gold
Parameters:
| Name | Type | Required | Default | Description |
|---|
| page | unsigned int | No | 1 | Shows a specific page of the results | | type | string | No | all | Shows only a specific type of treasures. Accepts: unsold,sold,bought,all | Response:
Code:
{
"success": true,
"error": null,
"data": {
"page": {
"current": 1,
"count": 1
},
"treasures": [
{
"id": 1,
"title": "My Treasure",
"cost": 1000,
"seller": {
"id": 1,
"name": "admin"
},
"buyer": {
"id": 2,
"name": "co-admin"
},
"created_at": 1234512345,
"bought_at": 1234512345,
"content": {
"length": 25,
"value": "This is a secret treasure"
}
}
]
}
}
URL: 
Description:Get information about a specific treasure Fee: 0 elite*gold
Parameters:
| Name | Type | Required | Default | Description |
|---|
| id | unsigned int | Yes | | Id of the treasure | Response:
Code:
{
"success": true,
"error": null,
"data": {
"id": 1,
"title": "My Treasure",
"cost": 1000,
"seller": {
"id": 1,
"name": "admin"
},
"buyer": {
"id": 2,
"name": "co-admin"
},
"created_at": 1234512345,
"bought_at": 1234512345,
"content": {
"length": 25,
"value": "This is a secret treasure"
}
}
}
URL: 
Description:Create a new treasure Fee: 1 elite*gold
Parameters:
| Name | Type | Required | Default | Description |
|---|
| title | string | Yes | | Public visible title of the treasure (should be some informations about the content, so other users knows what they are buying) | | content | string | Yes | | Content of the treasure that the buyer will be able to see after he bought the treasure | | cost | unsigned int | Yes | | How much should it cost to buy this treasure? | Response:
Code:
{
"success": true,
"error": null,
"data": {
"id": 1,
"title": "My Treasure",
"cost": 1000,
"seller": {
"id": 1,
"name": "admin"
},
"buyer": null,
"created_at": 1234512345,
"bought_at": null,
"content": {
"length": 25,
"value": "This is a secret treasure"
}
}
}
URL: 
Description:Buy a treasure that is still for sale Fee: 1 elite*gold
Parameters:
| Name | Type | Required | Default | Description |
|---|
| id | unsigned int | Yes | | Id of the treasure you want to buy | Response:
Code:
{
"success": true,
"error": null,
"data": {
"id": 1,
"title": "My Treasure",
"cost": 1000,
"seller": {
"id": 1,
"name": "admin"
},
"buyer": {
"id": 2,
"name": "co-admin"
},
"created_at": 1234512345,
"bought_at": 1234512345,
"content": {
"length": 25,
"value": "This is a secret treasure"
}
}
}
TradesURL: 
Description:Shows you all trades involving your account Fee: 0 elite*gold
Parameters:
| Name | Type | Required | Default | Description |
|---|
| type | string | No | all | Show only a specific type of trade. Accepts: all,requested,received | | status | string | No | all | Show only trades with in a specific state. Accepts: pending,accepted,waiting_for_approval,aborted,all | | page | unsigned int | No | 1 | Shows a specific page of the results | Response:
Code:
{
"success": true,
"error": null,
"data": {
"page": {
"current": 1,
"count": 1
},
"trades": [
{
"id": 1,
"from": {
"id": 1,
"name": "admin"
},
"to": {
"id": 2,
"name": "co-admin"
},
"middleman": null,
"threadid": 123456,
"note": "10 psc",
"status": "pending",
"timestamp": 1234512345
}
]
}
}
URL: 
Description:Get trade details for a specific trade Fee: 0 elite*gold
Parameters:
| Name | Type | Required | Default | Description |
|---|
| id | unsigned int | Yes | | Id of the trade | Response:
Code:
{
"success": true,
"error": null,
"data": {
"id": 1,
"from": {
"id": 1,
"name": "admin"
},
"to": {
"id": 2,
"name": "co-admin"
},
"middleman": null,
"threadid": 123456,
"note": "10 psc",
"status": "pending",
"timestamp": 1234512345
}
}
URL: 
Description:Generate the trade request URL Fee: 0 elite*gold
Parameters:
| Name | Type | Required | Default | Description |
|---|
| t | unsigned int | Yes | | Id of the trading thread | Response:
Code:
{
"success": true,
"error": null,
"data": {
"url": "https:\/\/www.elitepvpers.com\/theblackmarket\/traderequest\/1-1"
}
}
URL: 
Description:Create a trade request Fee: 1 elite*gold
Parameters:
| Name | Type | Required | Default | Description |
|---|
| t | unsigned int | Yes | | Id of the trading thread | | middleman | unsigned int | No | | UserId of the middleman you want to use for this trade | | note | string | No | | Visible note for the trade (your trading partner can see this before accepting the trade!) | | private | string | No | | Private note that is visible for your trading partner after accepting the trade (or after middleman approved the trade) | Response:
Code:
{
"success": true,
"error": null,
"data": {
"id": 1,
"url": "http:\/\/www.elitepvpers.com\/theblackmarket\/trade\/1",
"from": {
"id": 1,
"name": "admin"
},
"to": {
"id": 2,
"name": "co-admin"
},
"middleman": null
}
}
URL: 
Description:Accept, Reject or approve a trade Fee: 1 elite*gold
Parameters:
| Name | Type | Required | Default | Description |
|---|
| trade | unsigned int | Yes | | Id of the trade you want to update | | status | string | Yes | | The operation you want to do. Accepts: accept,approve,reject | | note | string | No | | Visible note for this trade | | private | string | No | | Private note for this trade (only visible to your trading partner (after accepting/approve the trade) and middleman) | Response:
Code:
{
"success": true,
"error": null,
"data": {
"id": 1,
"from": {
"id": 1,
"name": "admin"
},
"to": {
"id": 2,
"name": "co-admin"
},
"middleman": null,
"threadid": 1,
"note": "",
"status": "accepted",
"timestamp": 1234512345
}
}
OtherURL: 
Description:Get some information about an account Fee: 0 elite*gold
Parameters:
| Name | Type | Required | Default | Description |
|---|
| qu | int | No | 0 | UserID of the user you want to get informations about (eg 3493587) | Response:
Code:
{
"success": true,
"error": null,
"data": {
"id": 1,
"username": "admin",
"elitegold": {
"available": 0,
"locked": 0,
"total": 0,
"bought": 11180
},
"ratings": {
"theblackmarket": {
"positive": 0,
"neutral": 0,
"negative": 0
},
"middleman": null
}
"statistics": {
"posts": 1000,
"thanks": {
"given": 0,
"received": 0,
},
"joindate": "2000-12-31"
},
"ranks": ["administrator"]
}
}
The ranks field only contains certain ranks (not all ranks we have), so far those are:- administrator
- global_moderator
- community_manager
- moderator
- level_3
- level_2
- subscription_elite
- subscription_premium
- elite*gold_trader
- id_verified
- sponsor
- 2_factor_authenticated (for this the user needs to enable 2 Factor Authentication and needs to enable the badge also)
|
|
|
08/01/2023, 09:04
|
#2
|
Administrator
elite*gold: 26516
Join Date: May 2011
Posts: 21,003
Received Thanks: 2,346
|
New Update:
* get-user-info now allows you to get information also for other users (use the optional qu parameter for this)
* the bought field for elite*gold is always null for other users
* get-user-info got some new fields:
|
|
|
10/20/2025, 12:10
|
#3
|
Administrator
elite*gold: 26516
Join Date: May 2011
Posts: 21,003
Received Thanks: 2,346
|
New Update:
Using get-user-info, you can now obtain additional ranks if a user has them: - developer
- designer
- founder
- support
- bot
- editor
- event_planner
- guardian
- legend
- former_staff
- former_volunteer
- og_member
|
|
|
 |
Similar Threads
|
Public War Rock Stats API / Öffentliche War Rock Stats API
10/16/2013 - WarRock - 11 Replies
Hallo,
hier eine Kleinigkeit die ihr für euren Clan benutzen könnt:
http://wa-sta.net/other/api/
Damit könnt ihr z.B. auf eurer Clanseite einbinden, ob eure Member online sind, die Statistiken von ihnen etc.
|
API Error Code: 100 API Error Description: Invalid parameter Error Message: redirect_
04/08/2012 - elite*gold Trading - 2 Replies
API Error Code: 100
API Error Description: Invalid parameter
Error Message: redirect_uri URL is not properly formatted
Das bekomme ich wenn ich ne App installiere... ich habe schon 3 Apps richtig installiert, danach kam immer das bei anderen Apps die ich installiert habe..
was heisst das? redirect_uri URL is not properly formatted
|
[GUIDE]Api Sheild to be against API Tools!
10/15/2011 - Metin2 PServer Guides & Strategies - 8 Replies
I got lot's of pm's from people asking me about api tool shield , so i decided to make a guide to show ya all how to get rid of the nowadays hackers in your servers ...
First ... Open CONFIG of each channel , set pk_server:0 to pk_server:1
then in set adminpage_ip1 with adminpage_ip1: 192.168.2.(write yur real ip here) without quotes or space , just write it after the 192.168.2 directly like this ..
example : adminpage_ip1: 192.168.2.ip
And keep doing that for all CONFIG of all...
|
[ ALL IN ONE ] Lizenserver 7120 | API Server | API Tools
07/07/2011 - Metin2 PServer Guides & Strategies - 45 Replies
Hallo @all ServerAdmins!
Hier möchte ich euch ein Projekt von mir vorstellen der vieles einfacher macht.
Was ist das?
Ein Arbeitsplatz für Administratoren von Mt2 Server.
Was kann es?
behebt das Problem
socket_connect: HOST 220.95.239.40:7120, could not connect.
|
[HELP] Api tool v2 and other api's
05/28/2011 - Metin2 Private Server - 0 Replies
Hi,
can someone tell me where i can find the api tool v2 fix?
and if there are other types of API tools
Thank you very much
|
All times are GMT +1. The time now is 11:50.
|
|