Skip to content

Instantly share code, notes, and snippets.

@Alqueraf
Created August 26, 2020 16:11
Show Gist options
  • Save Alqueraf/cb7f9ae407d99b6545eb63e1182c9360 to your computer and use it in GitHub Desktop.
Save Alqueraf/cb7f9ae407d99b6545eb63e1182c9360 to your computer and use it in GitHub Desktop.
OAuth Tokens Request ktor
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