Staging host: instatasks.herokuapp.com
Ping: instatasks.herokuapp.com/ping
Admin endpoints mount to /admin protected route. For route access used BasicAuthorization strategy
| HEADER | VALUE |
|---|---|
| Content-Type | "application/json" |
| Authorization | "Basic " + Base64 encoded "username:password" |
username and password on server stored in environment variables:
SUPERADMIN_USERNAME=superadmin
SUPERADMIN_PASSWORD=superadminsupersecretpasswordNote: On the Production server all Environments Variables stored in .env file (see .env.exemple by example usage). On the staging hosting Heroku (https://dashboard.heroku.com/apps/instatasks) they are in the Settings section as the Reveal Config Vars
Authorization HEADER example:
Basic c3VwZXJhZG1pbjpzdXBlcmFkbWluc3VwZXJzZWNyZXRwYXNzd29yZA==POST /admin/useragent
Request Body
{
"name": "useragent1",
"activitylimit": 0,
"like": true,
"follow": true,
"pricelike": 1,
"pricefollow": 5,
"pricerateus": 20
}In this exemple is set of default values. Rquest Required only User Agent "name" key.
Response Body
{
"activitylimit":1,
"follow":true,
"like":true,
"name":"useragent1",
"pricefollow": 5,
"pricelike": 1,
"pricerateus": 20,
"rsa_public_key":"-----BEGIN RSA PUBLIC KEY-----\nMII...QAB\n-----END RSA PUBLIC KEY-----\n"
}GET /admin/useragent/pkey
Request Body
{
"name": "useragent1"
}Response Body
{
"rsa_public_key":"-----BEGIN RSA PUBLIC KEY-----\nMII...QAB\n-----END RSA PUBLIC KEY-----\n"
}POST /accaunt
| HEADER | VALUE |
|---|---|
| Content-Type | application/json |
Request Body
{
"instagramid": 666,
"deviceid": "device1"
}All keys required.
Response Body
{
"coins":0,
"instagramid":666,
"rateus":true
}POST /setting
| HEADER | VALUE |
|---|---|
| Content-Type | application/json |
| User-Agent | useragentname |
Request Body
not requiredAll keys required.
Response Body
{
"activitylimit":0,
"follow":true,
"like":true,
"pricefollow":5,
"pricelike":1,
"pricerateus":20
}POST /newwork
| HEADER | VALUE |
|---|---|
| Content-Type | application/json |
| User-Agent | useragentname |
Request Body
{
"instagramid": 777,
"count": 10,
"type": "like",
"mediaid":"mediaid1",
"photourl":"url/blabla",
"instagramusername":"url/blabla"
}Response Body
{
"coins":10
}POST /history
| HEADER | VALUE |
|---|---|
| Content-Type | application/json |
Request Body
{
"instagramid": 777
}Response Body
[
{
"taskid": "15",
"created_at": "2019-10-31T14:22:44.927428295Z",
"deleted_at": null,
"taskid": "15",
"type": "like",
"count": 20,
"left_counter": 20,
"photourl": "url/blabla",
"instagramusername": "url/blabla",
"mediaid": "mediaid2",
"instagramid": 777
}, {......}....
]POST /gettasks
| HEADER | VALUE |
|---|---|
| Content-Type | application/json |
Request Body
{
"instagramid": 777,
"type":"all"
}Response Body
[
{
"taskid":"2",
"type":"like",
"photourl":"url/blabla",
"instagramusername":"url/blabla",
"mediaid":"mediaid2"
},{....}...
]POST /done
| HEADER | VALUE |
|---|---|
| Content-Type | application/json |
| User-Agent | useragentname |
Request Body
{
"instagramid": 777,
"taskid": "19",
"status": "cancel" // or any not "cancel" as "ok"
}If status cancel: http status code: 205
{"error":"Task Canceled"}If status ok: http status code: 200
{"coins":15}POST /rateus
| HEADER | VALUE |
|---|---|
| Content-Type | application/json |
| User-Agent | useragentname |
Request Body
{
"instagramid": 888
}If already done: http status code: 406
{"error":"Task already done"}If status ok: http status code: 200
{"coins":35}