mixer / interactive-unity-plugin

Unity Plugin for Mixer Interactivity
MIT License
59 stars 23 forks source link

invalid_client #112

Closed djarcas closed 5 years ago

djarcas commented 5 years ago

It's quite likely that I'm doing something wrong, but I'm at a loss to see where - I've follow the tutorial, setup a scene, setup the OUTH, applied that in Unity, but OnRequestRefresheShortCodeCompleted() is bringing back "invalid_client" and a HTTP 400 error.

If I change the "OAuth Client ID" to something other than what the Mixer website gives me, then I get a "client not found", so I assume that part is correct. Changing the Version ID doesn't seem to affect anything.

Ideas or help welcome.

payzer commented 5 years ago

One thing we've seen in the past is this one: https://github.com/mixer/interactive-unity-plugin/issues/88

You could try re-creating the OAuth token.

djarcas commented 5 years ago

Good call! Sadly, it hasn't made any difference.

payzer commented 5 years ago

I'll give it a try now and see if I'm able to get a code.

payzer commented 5 years ago

Just tried was able to get a token. I guess you could:

  1. Make the request and paste the logs. You can turn on logging in the Interactive Editor panel. It's the last option.
  2. Delete your OAuth token so no one else can use it.
  3. Paste the output here and maybe I can notice if something's a weird format
djarcas commented 5 years ago
  1. There's no logs. I'm on verbose and literally not a single thing is written to the unity console initially. The only thing in the log that I didn't add is :

Trying to obtain a new OAuth token. This is an expected and repeated call. UnityEngine.Debug:Log(Object) Microsoft.Mixer.InteractivityManager:_Log(String, LoggingLevel) (at Assets/MixerInteractive/Source/Scripts/InteractivityManager.cs:3906) Microsoft.Mixer.InteractivityManager:TryGetTokenAsync() (at Assets/MixerInteractive/Source/Scripts/InteractivityManager.cs:501) Microsoft.Mixer.InteractivityManager:OnInternalCheckAuthStatusTimerCallback(Object, InternalTimerCallbackEventArgs) (at Assets/MixerInteractive/Source/Scripts/InteractivityManager.cs:496) MixerInteractiveHelper:CheckAuthStatusBackgroundWorkerDoWork(Object, DoWorkEventArgs) (at Assets/MixerInteractive/Source/Scripts/MixerInteractiveHelper.cs:449) System.ComponentModel.BackgroundWorker:ProcessWorker(Object, AsyncOperation, SendOrPostCallback)

  1. Sure, it's just a test project :

ac9a2ba2206cc30e60c2dcdebde91342a7db8079df1b1148 with VersionID 304167

djarcas commented 5 years ago

Resolved!

At https://mixer.com/lab/oauth there's TWO buttons, identically labelled 'Let's create one!'

The top one gives me a useless key. The bottom one (which has a different dialogue, talking about Secret keys), however, has given me a key that's working. Someone might want to revisit that page!

payzer commented 5 years ago

Great!