Created
August 26, 2020 16:11
-
-
Save Alqueraf/cb7f9ae407d99b6545eb63e1182c9360 to your computer and use it in GitHub Desktop.
OAuth Tokens Request ktor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val response = createNetworkClient().post<OAuthAccessTokenResponse>("https://id.twitch.tv/oauth2/token") { | |
parameter("client_id", clientID) | |
parameter("client_secret", clientSecret) | |
parameter("code", authorizationCode) | |
parameter("grant_type", "authorization_code") | |
parameter("redirect_uri", redirectUri) | |
} | |
Log.d("OAuth", "Access Token: ${response.accessToken}. Refresh Token: ${response.refreshToken}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment