|
22 | 22 | * Created by hasselbach
|
23 | 23 | *
|
24 | 24 | * For exposing your application for external calls (webhooks from MessageBird)
|
25 |
| - * you can use serveo.net: `ssh -R 80:localhost:3000 serveo.net` |
| 25 | + * you can use localtunnel (requires NodeJS). |
26 | 26 | *
|
27 |
| - * Here is example of usage |
| 27 | + * Here is example of usage: |
| 28 | + * |
| 29 | + * Install localtunnel globally: |
| 30 | + * npm install -g localtunnel |
28 | 31 | *
|
29 | 32 | * Select a free port: 3000, for example
|
30 | 33 | * export MBEXAMPLEPORT=3000
|
31 | 34 | *
|
32 | 35 | * Run:
|
33 |
| - * ssh -R 80:localhost:$MBEXAMPLEPORT serveo.net |
| 36 | + * lt --port $MBEXAMPLEPORT |
34 | 37 | *
|
35 | 38 | * It will show you something like this:
|
36 |
| - * Hi there |
37 |
| - * Forwarding HTTP traffic from https://blabla.serveo.net |
38 |
| - * Press g to start a GUI session and ctrl-c to quit. |
| 39 | + * your url is: https://loud-yak-31.loca.lt |
39 | 40 | *
|
40 | 41 | * * NOTE * you should not terminate this process, so next operations should be done in the other terminal session
|
41 | 42 | *
|
42 | 43 | * Remember the address from output:
|
43 |
| - * export FORWARDING_URL=https://blabla.serveo.net |
| 44 | + * export FORWARDING_URL=https://loud-yak-31.loca.lt |
44 | 45 | *
|
45 | 46 | * Take your access and secret key from Dashboard:
|
46 | 47 | * secret key from https://dashboard.messagebird.com/en/developers/settings
|
|
57 | 58 | * and then you will see in example app output:
|
58 | 59 | * New request:
|
59 | 60 | * GET /webhook?id=ee2d02749a6fb78a572bd7ce9118dff&mccmnc=20409&ported=0&recipient=XXXXXX&reference=example-server&status=delivered&statusDatetime=2019-01-10T09%3A23%3A03%2B00%3A00
|
60 |
| - * Request has valid signature |
61 | 61 | * Message for XXXXXX is delivered
|
| 62 | + * Request has valid signature |
62 | 63 | *
|
63 | 64 | * Description of webhook parameters can be found on
|
64 | 65 | * https://developers.messagebird.com/docs/sms-messaging#handle-a-status-report
|
|
0 commit comments