Ejemplo n.º 1
0
        public static AuthResponseDto RequestAuth(string clientId, string clientSecret, string code, string redirect)
        {
            var headers = new Dictionary <string, string>
            {
            };
            var values = new Dictionary <string, string>
            {
                { "client_id", clientId },
                { "client_secret", clientSecret },
                { "code", code },
                { "grant_type", "authorization_code" },
                { "redirect_uri", redirect },
            };

            return(Ajax.Post <AuthResponseDto>($"https://id.twitch.tv/oauth2/token", headers, values));
        }