This object is used to register the device with a BSN.cloud network and contains the following required properties:
token
string required: A player registration token returned by the server. This token allows players to provision themselves for a BSN.cloud network. Note that this is not a user token.
validFrom
dates required: The start of the validity date for the token. The date/time is formatted as yyyy-mm-ddThh:mm:ss.sssZ
.
validTo
dates required: The end of the validity date for the token. The date/time is formatted as yyyy-mm-ddThh:mm:ss.sssZ
.
This optional property can also be used:
scope
string optional: The scope of the device registration token. The default is "cert".
Sample Request
To get the device registration token:
curl --location --request POST 'https://api.bsn.cloud/2020/10/REST/provisioning/setups/tokens/' \ --header 'Accept: application/json' \ --header 'Accept-Encoding: gzip,deflate' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --header 'Authorization: Bearer 5BfFL3npQscN4RQUeO3V1EI8QKQzToBoVFkLAGg3qmcvsDSgFIt1OIc2P' \ --data-urlencode 'grant_type=user_access_token' \ --data-urlencode 'user_access_token=<redacted>' \ --data-urlencode 'client_id=<redacted>' \ --data-urlencode 'client_secret=<redacted>'
See this page for information about how to get a user access token.
Sample Response
{ "token": "cW7OQJPG21d3ao1wDzpUXTKMn2dyog7AvgD1qHm0XRNEWfw6kiqhZnWBNG7XJWt74o2nCZiIuedVOE894pz0OdoNZlXjOqgUPs6yrz7HMPPLBEOzZpvluN5shAXjJeES", "scope": "cert", "validFrom": "2024-03-05T19:50:25Z", "validTo": "2026-03-05T19:50:25Z" }