This article will go over how to create API keys and navigate the API portal.
You will need a Gmail or Google-associated account to sign in. You can learn more information here: Sign in to your Google Account with another email address - Computer - Google Account Help
The PurpleAir API uses two different API keys, a read key and a write key, which need to be used to make specific API calls. If you want to use the PurpleAir API, you can create your own API keys here: PurpleAir Develop.
API keys are issued per user, not per sensor.
Please review our article about the API Online Dashboard.
API keys will not be able to obtain data unless the project they’re linked to has points. After creating your first API keys, move points to a project or you may receive “PaymentRequiredError” when requesting data.
- After signing in, click “API Keys” on the left-hand side of the page.
- Click on “Add” in the top right-hand corner of the page.
- You will see an auto-populated project name, which you can rename anytime. You can have several projects and API keys. If you already have multiple projects, be sure to select the appropriate project.
- Select “Read” for the “Type,” select “Enabled” under “Status,” and leave the fields “Label,” “Host restrictions,” and “Referer restrictions” blank.
- Click “Add.”
- To create a “Write” key, repeat the process but select “Write” under “Type.”
- On the left-hand side of the page, click on “Projects.” Here you can edit and add projects, view each project’s usage, and archive projects.
- To add a project, click “Add” in the top right-hand corner of the page. Choose a project name, and click “Add.”
- To edit a project name, click the green icon with a pen next to the project you want to update.
- To archive a project, select the yellow icon with a briefcase,
- To check usage, select the green icon with the graph.
- Select “Users” on the left-hand side of the screen. Here you can edit the name and email of the user.
- Select “Organization” on the left-hand side of the screen. Here you can edit the organization’s name and view the organization’s usage.
- The “TopUp Account” button will allow you to add credits to your account. Credits will be used to make API calls. We will be implementing a payment system for making API calls in the future.