Migrate Kraken token to Helix - without secret

Hi there,

I have a twitch bot which was happily running for 5 years now. Unfortunately I lost 2FA access and am unable to get it via twitch support, since I don’t know (e.g.) which birthdate I made up when creating it.

I can’t find the client secret anymore either.

But I still have the oauth token on my server (which looks like this: oauth:abc123455689). But I cannot use this token in Helix as a Bearer token for some reason. Is there any way of using that Kraken auth token to get a Helix Bearer token?

OAuth is the same for both Kraken and Helix (just some different scopes). A token that works with one will work for the other if the scopes are correct.

Where as in Helix you would set the Authorization header to OAuth <Your Token>, in Helix you would instead send Bearer <Your Token>.

One thing worth noting, while legacy apps (such as those from 5 years ago) create OAuth tokens without an expiration, at some point in the future even those tokens will expire and those legacy apps will have the same expiring tokens as all current apps, so if you no longer have access to your account/app then in the future when the token expires you may not be able to obtain new ones.

1 Like

Thank you for the extremely quick answer! I can’t get it working it though.

Here’s my example Kraken query:
curl https://api.twitch.tv/kraken/users\?login\=aenduil -H "Accept: application/vnd.twitchtv.v5.json" -H "Client-ID: o9mxxxxxxxxxxoky" -H "Authorization: oauth:b2jxxxxxxxxxxxhyh"

{“_total”:1,“users”:[{…}]}

And I would rewrite this in Helix to:
curl https://api.twitch.tv/helix/users\?login\=aenduil -H "Accept: application/vnd.twitchtv.v5.json" -H "Client-ID: o9mxxxxxxxxxxoky" -H "Authorization: Bearer b2jxxxxxxxxxxxhyh"

{“error”:“Unauthorized”,“status”:401,“message”:“Client ID and OAuth token do not match”}

Could this be due to scopes? Or is there something wrong with my query?

The issue is that the OAuth token you’re trying to use wasn’t generated by the Client ID you’re using. Either you have multiple apps and are using the OAuth token from one with the Client ID of another, or you’ve used some 3rd party token generation site with your own Client ID.

Also, you can remove the "Accept: application/vnd.twitchtv.v5.json" that does nothing in Helix and was only used by Kraken to specify the version.

1 Like

Okay, thank you, I think I remember using an external tool for generating my token.