Register a kiosk device
POST
/tenant/devices
const url = 'https://api-sandbox.trustink.io/tenant/devices';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api-sandbox.trustink.io/tenant/devices \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example" }'Answers the device’s token for the AppSync Events API once; only its hash is kept.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
name
required
string
Examplegenerated
{ "name": "example"}Responses
Section titled “ Responses ”The device, its channel and its token.
Media typeapplication/json
object
deviceId
required
string
name
required
string
created
required
string
token
required
string
channel
required
string
Examplegenerated
{ "deviceId": "example", "name": "example", "created": "example", "token": "example", "channel": "example"}The request failed validation: validationErrors says where and why.
Media typeapplication/json
object
message
required
string
validationErrors
required
Array<object>
object
instancePath
required
string
keyword
required
string
params
required
object
key
additional properties
message
required
string
Examplegenerated
{ "message": "example", "validationErrors": [ { "instancePath": "example", "keyword": "example", "params": { "additionalProperty": "example" }, "message": "example" } ]}No or an invalid Cognito ID token (API Gateway answers {message} only).
Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{ "code": "example", "message": "example"}default
Section titled “default”Something failed on the platform, or the request timed out (code TIMEOUT, 503); try again.
Media typeapplication/json
object
code
string
message
required
string
Examplegenerated
{ "code": "example", "message": "example"}