To fetch data from Nitro Backend, you need the following IDs:
<ORGANISATION_TOKEN>
<PARENT>
<NITRO_ID>
These IDs are available fron nitro.js at the client side and can be fetched in 2 ways:
For example, Your nitroSettings object should look something like:
window.nitro = {
events: {
onIdentify: function() {
// ...
}
},
ready: function(token, parent, nitro_id) {
// ...
}
},
For example:
nitro.ready(function(token, parent, nitro_id) {
// send to your server to fetch data S2S
})
Once the required information has been provided in the callback function, send a request to your backend providing these IDs. Thereafter, make a request to nitro backend to fetch the corresponding details.
At server side:
<BEARER TOKEN>
[THIS TOKEN IS SPECIFIC TO - YOUR ORGANISATION. PLEASE USE IT CAREFULLY]https://t.makehook.ws/jsv1/events/<org_id>/<nitro_id>
Query Param: To fetch n-numbers of events, pass _n as query param with the desired number of events required.
example:
https://t.makehook.ws/jsv1/events/<org_id>/<nitro_id>?_n=5
Maximum number of 25 events are allowed, and default last 5 events are sent.
{
"code":2001,
"events":[
{
"id":"<NITRO_ID>",
"org":"<ORG_ID>",
"event":"<EVENT_NAME>",
"url":"<VISITED_PAGE_URL>",
"created_at":"<DATE_CREATED_FORMAT__ISO_8601_FORMAT>",
},
],
"message":"OK",
}