Skip to content

Instantly share code, notes, and snippets.

@ArsalRaza
Created March 21, 2020 07:58
Show Gist options
  • Save ArsalRaza/6db68e41de8e0515b22dd576b4016688 to your computer and use it in GitHub Desktop.
Save ArsalRaza/6db68e41de8e0515b22dd576b4016688 to your computer and use it in GitHub Desktop.
Bykea - Create Token API
/**
* request body for Bykea Authentication API
*
**/
data class AuthRequest(
val number: String,
val type: String
)
/**
* response body for Bykea Authentication API
*
**/
data class AuthResponse(
val token: String
)
/**
* Retrofit Interface declaration to execute API:
*
**/
@POST("/v1/oauth/customer")
fun performAuth(@Header("X-BB-Client-Key") clientKey: String, @Body authRequest: AuthRequest): Call<AuthResponse>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment