Info
Retrieve the fast hours and other information on your account.
GET
https://api.thenextleg.io/v2/info
Users have requested using GET requests with the Auth Token. You can pass any arguments in the POST request as encoded URI query parameters.
GET
https://api.thenextleg.io/v2/info?authToken=<token>
Do NOT use this endpoint on a cron or timed basis.
Though it may be tempting...0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
var axios = require('axios');
var config = {
method: 'get',
url: 'https://api.thenextleg.io/v2/info',
headers: {
'Authorization': 'Bearer <your-token>',
'Content-Type': 'application/json'
},
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});
HTTP Response
200Success
Your response will return a messageId
. Use the messageId
at the GET Message endpoint to poll for results, or to you can wait for the result to arrive via webhook.
0
1
2
3
4
{
"success": true,
"messageId": "your-message-id",
"createdAt": "2023-04-04T13:07:01.927Z"
}
Get your progress and retrieve a Message using GET
After receiving your messageId
you can use the GET /v2/message/<messageId> in order to retrieve your progress and image.
See the GET /v2/message/<messageId> docs for more information.
Completed Response
The message you receive by using the GET Message endpoint or received via your webhook, will have the following:originatingMessageId
The message ID from your original request
content
A string containing a response from (Redacted Name)
type
The type of message you are receiving
info
An object containing information about your account
0
1
2
3
4
5
6
7
8
9
10
{
"createdAt": "2023-04-04T13:07:01.927Z",
"originatingMessageId": "your-message-id",
"content":{
"Fast Time Remaining": "12.06/15.0 hours (80.37%)",
"Job Mode": "Fast",
},
"type": "info"
"ref": "",
"responseAt": "2023-04-04T13:06:01.927Z"
}