This article aims to guide you through the process of integrating the Content Triggers App with an external system, enabling you to programmatically send content to your screens.
To understand the functionality of the Content Triggers App, please refer to this article.
NOTE: For this article guidance, we will be using Postman as an external tool to represent a piece of software that will integrate with Nowsignage.
API endpoint
The API is open for POST requests to the following URL:
- https://api.nowsignage.com/v2/apps/triggers/events
This endpoint accepts a parameter named "trigger" which corresponds to the command key specified in the Triggers App within the Content Management System (CMS). A complete POST request including the trigger parameter will be structured as follows:
- https://api.nowsignage.com/v2/apps/triggers/events?trigger=my_command
Authorisation
The request is authorised by using an API key as a bearer token.
The API key can be found in your Nowsignage account (https://secure.nowsignage.com/admin/api_keys)
And be set with Read/Write access.
To accomplish this:
- Click into 'My Account'
- Click 'API Keys'
- Click '+Generate API Key' to create a new API key (you can label this Triggers API Key)
Once created:
- Click on the options button (...) Displayed at the right of the API key.
- Click the option to 'Set Read & Write Access
Once changed, it will display 'Read/Write'
Response
Depending on how Nowsignage handles your request, you may encounter several different responses.
- Successful request
Status code: 200 OK
Structure:
Example with data from a real response:
- No trigger commands found
Status code: 404 Not Found
- Not authorised - Wrong API key
Status code: 401 Unauthorised
- Not authorised - API key missing
Status code: 401 Unauthorised
- API key not set as Read/Write
Status code: 403 Forbidden