Twitch extension callbacks into droplet

Posted October 1, 2018 976 views
NetworkingUbuntu 16.04

Have a Discord bot that makes use of the Twitch API, this works locally on my machine, but doesn’t work when running from my droplet, this is a simple node image, nothing else installed.
From the looks of it, Twitch is not able to the callback, I’m using the ip4 address for the base of the callback which is not working, if i change this to my local machine and run it on the local machine it calls back, so id guess its safe to say that’s the issue.
Can i use the ip4 or do i need to setup something else in order for external apis to callback?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hey friend!

You can definitely use the IPv4 address on the droplet for this. For our perspective this is basically equivalent to the ability to run a website, etc. It is often the case that applications do not migrate from staging to production, most commonly due to unexpected differences in the environment. Some people will compensate for this by using Docker or things of that nature, while for others it makes more sense to just troubleshoot the issue.

I would troubleshoot this step by step, with the steps being relative. What is the method of the callback? Is it hitting a URL over HTTP? If so, can you hit that same end point? If not, why? Is the application listening on the port? Things like that, just as an example, might be valid questions along the way.


  • Hi, I decided to go with a Docker Compose route, works on my machine but when using docker-compose up from the droplet, I get this error

    ERROR: for client  Cannot start service client: driver failed programming external connectivity on endpoint dev_client_1 (ddd02f833c1a624c7515dbd95eb3035cf261042ad70425607e9069cc0db19cfb): Error starting userland proxy: listen tcp bind: address already in use

    im assuming the default port on droplets is 22 and my app runs on 4000 so ive done the yml files ports as 22:4000
    just in case i messed up the order i tried with the ports swapped around, this starts the app up correctly but the callbacks dont come back still.
    tried setting the callback URI: http://droplet-ip4-number:22/api/callback
    this didnt work either

    do i need to use a different port? nothing else ive set up should be using any ports