Authentication
How to authenticate and authorize

Authentication

All requests to the Cloudadar API must be authenticated via an API token. Include your secret API token in every request you send to the API with the Authorization HTTP header.
1
Authorization: Bearer <token>
Copied!
Now try a POST request using a read-only token. You will get a clear message along with the correct HTTP status code 403 forbidden.
Request
1
curl -sSX POST \
2
https://api.cloudradar.io/v1/ping/ \
3
-H 'Authorization: Bearer 002f0f852c9cb579a96c13d94a53d8357befc085ba618799'|jq
Copied!
Response
1
{
2
"success": false,
3
"message": "Authentication failed. This is a read-only token"
4
}
Copied!
get
https://api.cloudradar.io
/v1/ping/
Ping
1
curl -X GET \
2
https://api.cloudradar.io/v1/ping/ \
3
-H 'Authorization: Bearer 33891543f62ead9e18c32e1252e320c2710f708d9085fd5b'
Copied!
post
https://api.cloudradar.io
/v1/ping/
Ping
1
curl -X POST \
2
https://api.cloudradar.xyz/v1/ping/ \
3
-H 'Authorization: Bearer 33891543f62ead9e18c32e1252e320c2710f708d9085fd5b'
Copied!

Rate Limiting

All requests, whether they are authenticated or not, are subject to rate limiting. If you have reached your limit, your requests will be handled by a 429 Too Many Requests error. Responses contain several objects which provide information about your current rate limit status.
The default limit is 90 requests per minute per token.
Response HTTP 429 Too many Requests
1
{
2
"success": false,
3
"message": "Rate limit of 90 requests per 60 seconds exceeded.",
4
"details": {
5
"wait_seconds": 58,
6
"wait_until": 1555517800
7
}
8
}
Copied!
Last modified 2yr ago