Run PubSub example locally

Hi! I’ve been trying to run the PubSub example locally from the repo without success:

I’ve updated the scopes and added the needed client ID and using the redirect URI to my localhost:3030 but after login with Twitch info I’ve got an “redirect mismatch”.


This is the actual URL, but I’m confused since in the redirectURI param I’ve passed a not secure http://localhost:3000/

What can be wrong? any ideas? thanks a bunch!

If you’re passing http://localhost:3000/ as a param for the auth URL, is that EXACTLY what you have set in your apps settings in the developer console? It has to be an exact match, including any trailing slashes (or lack thereof).

1 Like

Hi! thanks for the quick answer!

The current URL in my dev console is http://localhost:8080/, I’ve just changed it in the PubSub example and reload. But still getting the redirect mismatch error :frowning:

Looking at the example, it’s significantly outdated and uses endpoints and scopes that don’t exist any more.

Try constructing the auth url yourself by following the step by step documentation Getting OAuth Access Tokens | Twitch Developers as that will that’ll help rule out issues of the guide just being out of date.

It it’s correct in both places, should also give it around 5 minutes in case of any caching on Twitch’s side that can result in a “mistmatch” error.


I’ve checked the auth url against the documentation and also allowed +5min wait time but still getting the “mismatch” error. I’m continue looking into this.

What does you “outbound” URL that users click on to be redirect to Twitch look like?

This is the URL used to be redirected to Twitch

Then I got this message from the redirect


After clicking continue I get the error. But it’s actually displayed on the URL itself:


And the oAuth Redirect URL on the console is exactly the same? for clientID - 2ltzo7xctab0g729501v91hq3qmbby

One thing to try and should be done) is to URI encode the redirect_uri in the query string to help confusions.


Poking about it seems that the URI is not in the dashboard doesn’t directly match the URI you are trying to use.

1 Like

Ok! this solved the issue. I thought I have the same OAuth URL but apparently I forgot to add the port, so used exactly the same one and the redirect works ok launching a different Twitch authorisation page. After clicking ok, the new url appends correctly the #access_token and works as intended!

Thanks a bunch!

Hi! another question regarding the example, I got an error 410 while trying to send the request to url

I’ve been looking into the documentation, but not sure what should be the right url for this property.

After including the Client ID:

still have the 410 but with a message including the docs url: Twitch Developer Documentation | Twitch Developers (

Kraken is dead and no longer documented or supported for use
It was deprecated and removed from active service

You need helix users

Replaced with the new endpoint: and it’s working ok, thanks again!

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.