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
datesrequired: The start of the validity date for the token. The date/time is formatted as yyyy-mm-ddThh:mm:ss.sssZ
.
validTo
datesrequired: 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
stringoptional: The scope of the device registration token. The default is "cert".
...
Code Block | ||
---|---|---|
| ||
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.
...