1. API Documentation
  2. Motion Capture REST API documentation

API authentication

Header: ‘Authorization’

PLSK1-HMAC-SHA256 Credential=[AccessKey], Body=[BodyHash], Signature=[timestamp(ms)]:[HMAC hex]

ex)

PLSK1-HMAC-SHA256 Credential=AKIA5QKJTP5Z23CFYJWK, Body=9bb58f26192e4ba00f01e2e7b136bbd8,  Signature=1648167004270:76251c6323fbf6355f23816a4c2e12edfd10672517104763ab1b10f078277f86

Body

const bodyHash = crypto.createHash('md5');
bodyHash.update(JSON.stringify({ foo: 'bar' })); // requesy payload
bodyHash.digest('hex');

HMAC(Signature)

const crypto = require('crypto');
const hmac = crypto.createHmac('sha256', 'secret');
const timestampMs = Date.now().toString();
hmac.update(timestampMs);
hmac.update('POST');
hmac.update('/api/order');
const bodyHash = crypto.createHash('md5');
bodyHash.update(JSON.stringify({ foo: 'bar' })); // requesy payload
hmac.update(bodyHash.digest('hex'));
console.log(`${timestampMs}:${hmac.digest('hex')}`);