Skip to content

Instantly share code, notes, and snippets.

@jetaggart
Created June 29, 2020 18:39
Show Gist options
  • Select an option

  • Save jetaggart/8dfd9a57bb805747c20e7bf0b80087b9 to your computer and use it in GitHub Desktop.

Select an option

Save jetaggart/8dfd9a57bb805747c20e7bf0b80087b9 to your computer and use it in GitHub Desktop.
// android/app/src/main/java/io/getstream/thestream/services/BackendService.kt:27
data class StreamCredentials(val token: String, val apiKey: String)
fun getChatCredentials(): StreamCredentials {
val response = post(
"/v1/stream-chat-credentials",
mapOf(),
authToken
)
return StreamCredentials(
response.getString("token"),
response.getString("apiKey")
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment