Below you will find documentation to query the Vea API and retrieve data from your sensors.
To test queries, you'll need to have a valid Vea account and API credentials. Once you have those, you can follow these instructions to temporarily authorize this page and allow you to make API calls.
Before moving on to testing the API, you will want to review this guide to see a concrete example of authentication with the API and using the access token to make API calls for data.
To authenticate, you'll need to request an access token. Run the following command, substituting your "client_id" and "client_secret":
curl \ -H "Content-type: application/json" \ -d '{"grant_type": "client_credentials", "client_id": "19c1514d-...", "client_secret": "a6af3083..."}' \ https://auth.sensourceinc.com/oauth/token
You will get a response with the access token in it:
{ "access_token":"7a7f1d1256f67e531359f00e6feea254a1d605c5947cd1d3610a01249ccb5acc", "refresh_token":"718f6ff90c644866f564df9090dc2f905112c74959a5caf79587c78fd5c04a55", "expires_in":3600, "token_type":"Bearer" }
Copy the "access_token" value ("7a7f1d..." in the example). Click the "Authorize" button in the API docs. Then enter in the same thing you'd enter in the "Authorization" header for an API request: the word "Bearer", then a space, then the access_token value:
You should now be able to make the API calls