Authentication
Basic Authorization Header
The Basic Authorization header tells the API who you are.
- It contains your clientId and clientSecret, joined with a colon (
:) and Base64‑encoded. - Always call over HTTPS to keep your credentials safe.
- Example:
Authorization: Basic bXlDbGllbnRJZDpteUNsaWVudFNlY3JldA==
If you have the appropriate access, you can view this information on your dashboard when you log in to the system.: https://online.photo-motion.com/dashboard
IMPORTANT❗️
The clientId used for authorization is NOT the same as the clientId used for other requests. e.g. .../v2/client/{clientId}/products.
To obtain your clients' IDs, see User.
Get access token
request-post
https://api.photo-motion.com/v2/oauth/tokenHeaders
| Key | Value | |
|---|---|---|
| Authorization | Basic YOUR_ENCODED_CREDENTIALS | Required |
| Content-Type | multipart/form-data | Required |
Body
| Key | Value | |
|---|---|---|
| grant_type | password | Required |
| username | YOUR_USERNAME | Required |
| password | YOUR_PASSWORD | Required |
Response Example
json
{
"token_type": "Bearer",
"expires_in": 86400,
"access_token": "5kN0uhxMcZnoMSMmPHpTouaDw_BhSXcIH7u9YvDdUW66BIHuby",
"refresh_token": "8249b1407395a47aeb637dee54b4d09383e33b057a791324e33c253"
}Refresh access token
request-post
https://api.photo-motion.com/v2/oauth/tokenHeaders
| Key | Value | |
|---|---|---|
| Authorization | Basic YOUR_ENCODED_CREDENTIALS | Required |
| Content-Type | multipart/form-data | Required |
Body
| Key | Value | |
|---|---|---|
| grant_type | refresh_token | Required |
| refresh_token | YOUR_REFRESH_TOKEN | Required |
Response Example
json
{
"token_type": "Bearer",
"expires_in": 86400,
"access_token": "5kN0uhxMcZnoMSMmPHpTouaDw_BhSXcIH7u9YvDdUW66BIHuby",
"refresh_token": "8249b1407395a47aeb637dee54b4d09383e33b057a791324e33c253"
}