-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'client_id=<your client id goes here>&client_secret=<your client secret goes here>&grant_type=client_credentials'
I just need you to answer directly mate. Was seeing this same stuff with
etc. Not sure why you don’t just give a code example like some other do on this forum.
I do not know Curl I do not KNOW what the equivalent in C# is for these -H and -c responses. I cannot google it easily, twitch api is only used for TWITCH it’s not like the internet is breeming with documentation examples for twitch specific calls. Never even heard about Curl until 2 hours ago. Also, twitchlib is trying to wrap everything into their own little “NuGet” and I don’t want to spent 6 hours + reading through BS to find the answer to -h and -c. If I know how to parse field1 and field2 for this -h and -c thing then the parsing the www.ToString().Format() and looking for something called ```
“access_token”:
all this is done in .net by WWWForm, const/var, or byte[] gotta know which one this is trying to get me to do. I'm assuming I can do it via WWWFrom and using form.AddField("Client_ID,ClientSeret") still not sure if paremeters are suppsed to be chained in the Client_ID field or, if I need to parse it differently hence why a C# code example would solve this immediately. I can only assume and If not parsed correctly. will just send errors
I tried this,
public IEnumerator GetAuthorization()
{
WWWForm Content = new WWWForm();
Content.AddField(TwitchTokenScopes, mySecret);
using (UnityWebRequest www = UnityWebRequest.Post("https://id.twitch.tv/oauth2/token", Content))
{
yield return www.SendWebRequest();
if(www.result != UnityWebRequest.Result.Success)
{
Debug.Log(www.error);
}
else
{
Debug.Log(www.ToString());
}
}
}
there error in browser is, {"status":400,"message":"missing response type"}
so if you or anyone else reading this can just type in a code example given what I've said then would be great here is the TwitchTokenScopes -> ?response_type=code&client_id=3oagpekjph2wq8dmd8fq9p7169u7mk &redirect_uri=http://localhost:3000&scope=user:edit:follows&scope=moderator:read:followers