Token Entity (v3)
3 min
this object is used to register the device with a bsn cloud network and contains the following required properties token \<font color="#704ae0">string\</font> \<font color="#01a0af">required\</font> a device registration token returned by the server this token allows devices to provision themselves for a bsn cloud network note that this is not a user token validfrom \<font color="#704ae0">dates\</font> \<font color="#01a0af">required\</font> the start of the validity date for the token the date/time is formatted as yyyy mm ddthh\ mm\ ss sssz validto \<font color="#704ae0">dates\</font> \<font color="#01a0af">required\</font> 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 \<font color="#704ae0">string\</font> \<font color="#01a0af">optional\</font> 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 docid 0qhibo6ras8zwyjybeh0r 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" }