Documentation
Here is the documentation to use our service.
Contents
- Authentication
- Generate Token
- Generate Image URL
- Generate Image URL Multiple
- Purge Cache
- Error Response
Without API Service
You are able to cdnify your image directly by using our url parameter. But using this won't hide your original image link.
If you want to hide or proxify your original image link, you should generate your image url by using our API Service.
1. Using URL Parameter
Description:https://cdn.starcheckin.net/image?url=[YOUR_IMAGE_LINK]&referer=[OPTIONAL]&mime=[OPTIONAL]
- url : Your image url must be already url_encoded.
- referer : Use this if you want to bypass hotlink protection. [Optional]
- mime : Use this if your image url using dynamic url (no extention). [Optional]
With API Service
By using our API service, of course you will get all features here.
- Unlimited / No Rate Limit request (at this time).
- Permanent / Lifetime of use API.
1. Authentication
To use all API service here, you required to have an api key.
To get your api key, you have to make some donation to us.
For more details about make donation, please contact us at here.
2. Generate Token
To use all API service here, you have to Generate Token.
Method | Url | Header | Body |
---|---|---|---|
POST | https://cdn.starcheckin.net/api/generate-token | x-auth-key: [api_key] | N/A |
Example Response:
Description:{ "message": "Generate token success", "statusCode": 200, "data": { "token": "9f72356958bbf3b7e...", "expire": 1602663919373 } }
- You have to replace [api_key] with your api key.
3. Generate Image URL
Use this API for Single Image URL request.
Method | Url | Header | Body |
---|---|---|---|
POST | https://cdn.starcheckin.net/api/generate | content-type: application/json | { "url": "https://example.com/300/09f/fff.png", "referer": "", "mime": "", "token": "9f72356958bbf3b7e..." } |
Example Response:
Description:{ "message": "Generate image url success", "statusCode": 200, "data": { "url": "https://cdn.starcheckin.net/image?url=https://example.com/300/09f/fff.png", "secure": "https://cdn.starcheckin.net/img/8d9e6cedb5a9666.png" } }
- url {string} : This is your image url.
- referer {string} : Use this if you want to bypass hotlink protection. [Optional]
- mime {string} : Use this if your image url using dynamic url (no extention). [Optional]
- token {string} : This is your authentication to use all API service.
4. Generate Image URL Multiple
Use this API for Multiple Image URL request.
Method | Url | Header | Body |
---|---|---|---|
POST | https://cdn.starcheckin.net/api/generate-multiple | content-type: application/json | { "images": [ { "url": "https://example.com/300/09f/fff", "referer": "https://example.com", "mime": "png" } ], "token": "9f72356958bbf3b7e..." } |
Example Response:
Description:{ "message": "Generate image url multiple success", "statusCode": 200, "data": [ { "image": { "url": "https://cdn.starcheckin.net/image?url=https://example.com/300/09f/fff&referer=https://example.com&mime=png", "secure": "https://cdn.starcheckin.net/img/8d9e6cedb5a9666.png?referer=8d9e6cedb5a9666&mime=png" }, "success": true, "error": "" } ] }
-
images {array object} : This is your image url in array which is contains object:
- url {string} : This is your image url.
- referer {string} : Use this if you want to bypass hotlink protection. [Optional]
- mime {string} : Use this if your image url using dynamic url (no extention). [Optional]
- token {string} : This is your authentication to use all API service.
5. Purge Cache
Use this API for Purge Cache your cdn image url.
Method | Url | Header | Body |
---|---|---|---|
POST | https://cdn.starcheckin.net/api/purge-cache | content-type: application/json | { "files": [ "https://cdn.starcheckin.net/img/xxx.png", "https://cdn.starcheckin.net/img/abcdef.png", ], "token": "9f72356958bbf3b7e..." } |
Example Response:
Description:{ "message": "Request purge cache success", "statusCode": 200, "data": { "id": "9bf382d639b255667ddf0..." } }
- files {array string} : This is your cdn image url in array string. You can input urls up to 30 at this time.
- token {string} : This is your authentication to use all API service.
6. Error Response
We have standard to return all error response with using this json structure.
Example Error Response:
Description:{ "message": "Wrong authentication method!", "error": "Bad Request", "statusCode": 400 }
- message {string} : This is the error message.
- error {string} : This is the detail of error.
- statusCode {number} : This is the status code of error.