Verify an API key
curl --request GET \
--url https://ipcrazy.com/api/v1/access \
--header 'Authorization: Bearer <token>'import requests
url = "https://ipcrazy.com/api/v1/access"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ipcrazy.com/api/v1/access', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"customer_id": "example-customer-id",
"credential_id": "00000000-0000-4000-8000-000000000000",
"capabilities": [
"access:read"
],
"proxy_enabled": false
},
"trace_id": "9f2c7a8e-0000-4000-8000-000000000000"
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Valid API key required",
"retryable": false
},
"trace_id": "9f2c7a8e-0000-4000-8000-000000000000"
}API reference
Verify an API key
Checks that the API key is valid and returns the account and key it belongs to. It does not grant or reveal proxy access.
GET
/
api
/
v1
/
access
Verify an API key
curl --request GET \
--url https://ipcrazy.com/api/v1/access \
--header 'Authorization: Bearer <token>'import requests
url = "https://ipcrazy.com/api/v1/access"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://ipcrazy.com/api/v1/access', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"data": {
"customer_id": "example-customer-id",
"credential_id": "00000000-0000-4000-8000-000000000000",
"capabilities": [
"access:read"
],
"proxy_enabled": false
},
"trace_id": "9f2c7a8e-0000-4000-8000-000000000000"
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Valid API key required",
"retryable": false
},
"trace_id": "9f2c7a8e-0000-4000-8000-000000000000"
}Use this endpoint to check that your application is configured with a valid key, for example at startup or in a health check. It returns the account and key the request was authenticated with.
proxy_enabled is always false: API keys never grant proxy access. Get proxy connection details in the console.
A 401 response means the key is missing, malformed or revoked, or its account is suspended or not yet verified. Do not retry a 401 with the same key.