You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Example of sending job with callback_url and payload
3
+
4
+
- testCallback.js: launches a transcoding job specifying a "callback_url" param and payload for the job.
5
+
- callback_handler.js: server side script to accept the callback request. The callback_url param for the job should contain a valid HTTP(S) URL where the callback_handler.js script is working.
6
+
7
+
## Workflow
8
+
1. Install prerequisites for callback_handler.js:
9
+
```
10
+
npm install express body-parser
11
+
```
12
+
2. Launch callback_handler.js:
13
+
```
14
+
node callback_handler.js
15
+
```
16
+
By default it will start the HTTP service on port 3000, the callback url will be http://<your_host>:3000/callback
17
+
You can optionally use [ngrok](https://ngrok.com/) tool on localhost to provide you with a public URL:
18
+
```
19
+
ngrok http 3000
20
+
```
21
+
ngrok will provide a public URL (e.g., https://abc123.ngrok.io). Use this URL as the callback URL in Qencode's settings.
22
+
3. Excute testCallback.js to run a test job. Don't forget to specify your Qencode API Key and your callback url.
23
+
24
+
You should see notifications on callback events in the callback_handler.js output.
0 commit comments