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/contact-details/<token>/< parent_id>/<nitro_id>
code: 2001,
identified_data: {
email: < EMAIL>,
phone: < PHONE>,
consent_data: {
is_phone_consented: true/false,
is_email_consented: true/false,
},
message: "ok"