I plan on creating a simple application that receives PubSub messages and saves them in a database.
I have already done this for IRC messages with the official python chat code sample but I am having trouble doing this for the official javascript pubsub sample.
What I did:
- I set my client id correctly in main.js and set my redirect URI to ‘https:\localhost’ which matches the setting in my application dashboard.
- I opened the index.html file in firefox, authorized myself by clicking on the ‘Connect with Twitch’ button and arrived here:
I don’t understand where I get the PubSub messages from, the ‘index.html’ file defines a form for choosing topics but I never see it, does someone have some guidance for me on where I am going horribly wrong?
george
2
You have your access token showing in your screenshot. I would recommend revoking it immediately.
You probably don’t have a web server running on the PC where you are making the request so you are getting “unable to connect”.
2 Likes
Thanks @george, I’ve fleshed out the exact steps in case another user needs more information.
- set the
redirectURI variable in main.js to http://localhost:3000.
- set the redirect URI in your twitch app dashboard to
http://localhost:3000.
- install nodejs.
- open a terminal and run
npm install http-server -g.
- cd into
pubsub-samples/javascript.
- run
http-server -p 3000.
- open
http://localhost:3000 in your web browser.
system
Closed
4
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.