Error Codes

401 Unauthorized

Additional Notes

A valid access token lasts for the number of seconds specified in the expires_in field. An app should check to make sure that the token is not expired before sending a request to the Insights API, otherwise the Insights API will return an unauthorized response. A reasonable approach would be to obtain a new token some period before the current token expires (5 minutes, 15 minutes before token expiry etc.).