Get Image Safely
POST
https://api.thenextleg.io/getImage
Retriving images from the (Redacted Name) CDN from your server will result in a 403. This endpoint allows you to retrieve the image data safely.
Currently only implemented with POST, but if users desire a way to retrieve with GET, please let us know.
Parameters
imgUrl
Use theimgUrl
returned in an imagine command0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const axios = require('axios');
let data = JSON.stringify({
"imgUrl": "your-img-url"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api.thenextleg.io/getImage',
headers: {
'Content-Type': 'application/json',
'Authorization': 'Bearer <your-token>'
},
responseType: 'arraybuffer',
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});