For detailed guides and tips check out our new Knowledge Hub:
Visit Knowledge Hub
❗️API Change Notice:
Note that https://api.raptormaps.com is the latest API as of June 2021. "Raptor App Legacy API" will continue to be deprecated.
Third-party data ingestion still remains at [https://app-legacy.raptormaps.com].
Raptor Maps is using a secure system for permanent API credentials that allow users to receive temporary API tokens. This now means a 2 step process to get your API token:
Creating API credentials for your user in the Raptor App at the My Profile page
Sending a request with these credentials to our Auth API that will return an expiring API Key (AKA Access Token)
Let's walk through these steps in detail to get you started with the Raptor Maps API!
Creating API Credentials
If you have existing credentials, you should see your credentials loaded shortly after navigating to the Profile Page and can skip this section.
Navigate to the My Profile page of the Raptor App.
New API users without existing credentials should see the Create API Credentials button under the API Credentials section. Click this to create your credentials!
Your credentials will appear on screen once created!
Creating API Credentials In Progress
API Credentials successfully created!
IMPORTANT - Make sure you never give your Client Id & Client Secret combination to anyone you do not trust - anyone with this information will be able to authenticate against our application as your user.
If you suspect your API credentials are being misused by unauthorized parties, Raptor Maps can revoke access to allow you to create new API credentials.
Using API Credentials
Setting Up Your Environment
Once you have your API credentials, you may want to save these values to your system's environment variables. We've chosen to save them as:
These values will be used to request & receive an actual API token you can use to hit our API endpoints. We've also chosen to save an existing token as:
In our example, we saved the token in the environment for re-use, since it lasts for 30 days. It is highly recommended to do the same, and only retrieve a new token when necessary - for example, when the prior token has expired. Exact token caching implementation is left up to the API use
Getting an Org ID
org_id is a commonly required query parameter to our API calls for authorization to view specific data.
To retrieve an ORG_ID value, visit My Profile and look under the Organizations section. You may have multiple ORG_ID values, so make sure you are using the correct one for the data you are requesting.
Find your Org IDs here
Here's a simple Python example of how to retrieve an API token, and use it to load the data for a demo solar farm from the API.
At this point you should be authenticated into the Raptor App. Enjoy.