First, it's worth noting that Localytics has multiple APIs. For example, at present, we have a Query API that can be used to programmatically retrieve analytics data; a Profiles API which can be used to programmatically communicate or request user Profile data; and a Push API that can be used to programmatically issue instructions for sending a push message to your users.
If your API requests are failing, you should check the following:
- That you are using a valid API key that is specifically designed for the API that you are querying against. For example, the API key you need to make requests against the Query API is different than the API key you need to make requests against the Push/Profiles API. To find these, navigate to the Localytics dashboard, then to the Settings page, and then to the API Keys option. If you don't have an API key, submit a request to Localytics Support.
Service | What It Does | Key | Limits |
---|---|---|---|
Query API | Analytics data on users, events and sessions. | Analytics API Key | Analytics Rate Limits |
Profile API | Store and retrieve profile information on your users. | Profiles & Push API Key | Profile Rate Limits |
Push API | Send real-time push notifications to your users. | Profiles & Push API Key | Push Rate Limits |
-
If you have confirmed that your API key is valid, we recommend you review the documentation for the API and evaluate the error code that you are getting. For example, we report common error codes and their interpretation within the documentation (e.g. Error Codes for Push API).
-
If you are issuing API requests to query data or issue push message instructions, be sure that you have the appropriate permissions within Localytics - e.g. that you as a Localytics user have permissions to all apps for which you are issuing queries.
-
We rate-limit our APIs to prevent abuse and protect overall system health. Our rate limits are quite generous, so if you're hitting the maximum there is likely room for optimization. Consider revising your API query or spacing out the requests, or submit a request to Localytics Support if after doing so you still have problems and need to understand better.