Skip to main content

Authentication

The Particle Space API uses API keys to authenticate requests. You can view and manage your API keys in the Particle Space Dashboard.

Test mode secret keys have the prefix sk_test_ and live mode secret keys have the prefix sk_live_. Your publish test key will have the prefix pk_test_ and live mode will have pk_live_.

Your API keys carry many privileges, so be sure to keep them secure! Do not share your secret API keys in publicly accessible areas such as GitHub, client-side code, and so forth.

All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail. Remember that you need to sign each request using the given time-restrained Bearer Token.

Endpoints

POST /v1/authenticate

Code Example

POST - https://api.particlespace.com/api/v1/authenticate
var axios = require('axios');
var qs = require('qs');
var data = qs.stringify({
'secret_key': 'MY_SECRET_KEY',
'publish_key': 'MY_PUBLISH_KEY'
});
var config = {
method: 'post',
url: 'https://api.particlespace.com/api/v1/authenticate',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data : data
};

axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});