This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"assetID": "urn:aaid:AS:UE1:23c30ee0-2c4d-46d6-87f2-087832fca718", | |
"documentLanguage": "en-US" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type":"CALLBACK", | |
"data": { | |
"url":"your webhook url", | |
"headers": { | |
"name":"value" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"assetID": "urn:aaid:AS:UE1:23c30ee0-2c4d-46d6-87f2-087832fca718", | |
"documentLanguage": "en-US", | |
"notifiers": [ | |
{ | |
"type": "CALLBACK", | |
"data": { | |
"url": "https://dummy.callback.org/" | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function createPDFJob(asset, webhook, token, clientId) { | |
let body = { | |
'assetID': asset.assetID, | |
'documentLanguage': 'en-US', | |
'notifiers': [ | |
{ | |
'type':'CALLBACK', | |
'data':{ | |
'url':webhook |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Used to debug webhook notifications. | |
Will need to be used with ngrok. | |
Thanks to Todd Sharp for the base code I modified. | |
*/ | |
import * as http from 'http'; | |
async function handler(req, res) { | |
console.log('Entered webhook handler.'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ack":"done" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"jobID": "FAQjIUIGfuIkgcBMMunRsZ56P6qoQ4bR", | |
"statusResponse": { | |
"status": "done", | |
"asset": { | |
"metadata": { | |
"type": "application/pdf", | |
"size": 79120 | |
}, | |
"downloadUri": "very long and very special unique url. so special", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type":"CALLBACK", | |
"data": { | |
"url":"your webhook url", | |
"headers": { | |
"name":"value" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type":"CALLBACK", | |
"data": { | |
"url":"your webhook url", | |
"headers": { | |
"cats":"rule", | |
"dogs":"drool" | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function createPDFJob(asset, webhook, token, clientId) { | |
let body = { | |
'assetID': asset.assetID, | |
'documentLanguage': 'en-US', | |
'notifiers': [ | |
{ | |
'type':'CALLBACK', | |
'data':{ | |
'url':webhook, |
NewerOlder