Check authentication
Confirms your API key is valid and returns the identity it resolves to.
GET
/v1/pingTry it
GET
https://newsapi.insighthread.com/api/v1/pingServer
Authorization
Request
curl -X GET "https://newsapi.insighthread.com/api/v1/ping" \
-H "Authorization: Bearer YOUR_TOKEN"const response = await fetch("https://newsapi.insighthread.com/api/v1/ping", {
method: "GET",
headers: {
"Authorization": "Bearer YOUR_TOKEN"
}
});import requests
response = requests.get(
"https://newsapi.insighthread.com/api/v1/ping",
headers={
"Authorization": "Bearer YOUR_TOKEN"
},
)Response
{
"ok": true,
"message": "string",
"client": {
"id": "string",
"label": "string",
"prefix": "string"
},
"served_at": "2019-08-24T14:15:22Z"
}{
"error": {
"type": "unauthorized",
"message": "string"
}
}Authorization
AuthorizationBearer token · headerrequiredAn API key, e.g. `Authorization: Bearer ik_test_...` or `Authorization: Bearer ik_live_...`.
Responses
200Authenticated successfully.
okbooleanmessagestringclientobjectShow propertiesHide properties
idstringlabelstringprefixstringserved_atstring<date-time>401Missing, malformed, or revoked API key.
errorobjectShow propertiesHide properties
typestringAllowed:
unauthorizedinvalid_requestserver_errormessagestring
