Cloud APIs
Postman Collections
9 min
this is a collection of sample endpoint calls to introduce users to our infrastructure it is not a comprehensive document of our available endpoints please see the docid\ goemci9nmvgakttr5qcjs , docid\ kku9e7f7chc5lwofxs9e0 , and docid\ wccw4tqerzpxv7kjq a3p endpoint documentation for a complete list of those endpoints and their usage prerequisites a postman account if necessary, go to https //www postman com/downloads/ to download postman and create a free account a brightsign player with an active internet connection a bsn cloud account with at least one network access to the https //adminpanel bsn cloud the two files below create client credentials before you can use the apis, you need to create an application in the bsn cloud https //adminpanel bsn cloud/en/auth/signin to get a client id and client secret see docid 1nn8bxjbolvudos yfr3d for instructions client secrets expire every 180 days set a reminder to rotate them before expiry import the collection & environment import the environment open postman and select import at the top left drag and drop (or browse to) the bsn cloud production postman environment json file select import to confirm import the collection select import again drag and drop (or browse to) the bsn cloud api 2022 06 postman collection json file select import to confirm activate the environment select bsn cloud production from the environment dropdown in the top right corner (it may say "no environment"), as shown in image 1 the environment is now active — all {{variable}} references in the collection will resolve using these values configure environment variables click the eye icon next to the environment dropdown to view and edit your environment variables you need to set a few values before making any requests required variables true 144,252 0610020108672,264 93899798913276 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type optional variables (set as needed) true 142,519 unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type unhandled content type 1 1 unhandled content type 1 1 unhandled content type unhandled content type unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type 1 1 unhandled content type auto populated variables token set by "get access token" setupid set by "post /setup/" deviceid set by "post /device/" deviceregtoken , deviceregtokenscope , deviceregtokenvalidfrom , deviceregtokenvalidto set by "get device registration token" enter values in the current value column (not the initial value column) to keep your credentials local and prevent them from being synced to postman's cloud authentication workflow the bsn cloud api uses a two step authentication process you must complete both steps before making any other api calls step 1 get an access token in the collection sidebar, expand the authentication folder select get access token click send this sends a post request to the brightsign auth server using the oauth2 client credentials flow the request uses http basic authentication with your client id and client secret (handled automatically by postman's auth tab) on success, the test script automatically saves the access token to the {{token}} environment variable step 2 set the network select set network (by name) (or set network (by id) if you prefer) select send this tells the bsn cloud api which network you want to work with in this session the request uses the token obtained in step 1 an http 204 no content empty body response is normal and means success after both steps complete successfully, all other requests in the collection will work using the {{token}} variable that was automatically set every time you get a new access token, you must set the network again the token expires after 5 minutes 30 seconds , but the network session lasts 24 hours troubleshooting could not get any response" or connection timeout verify you have internet connectivity check that the urls in your environment are correct (click the eye icon to verify) ensure your corporate firewall/proxy allows connections to bsn cloud 204 no content on set network (but subsequent calls fail) the network name may be misspelled names are case sensitive verify the network exists and your account has access to it try set network (by id) instead of the numeric network id 400 bad request on set network the specified network does not exist or you don't have access to it double check the networkname or networkid in your environment 401 unauthorized on get access token double check your clientid and clientsecret values in the environment (look for extra spaces or missing characters) verify your client secret hasn't expired (180 day limit) if it has run get access token again run set network again retry your original request make sure you're entering values in the current value column 401 unauthorized on other requests your access token has expired (it has a five minute 30 second lifetime) you must run get access token and set network again make sure the environment dropdown (top right) is set to bsn cloud production 403 forbidden your application doesn't have the required scope for this api call go to the admin panel, edit your application, and add the necessary features then get a new access token (scope changes don't take effect on existing tokens) you must belong to the same bsn cloud network as the player if you are messaging it using the remote dws apis 404 not found check that the url path is correct