Created
March 21, 2020 07:58
-
-
Save ArsalRaza/6db68e41de8e0515b22dd576b4016688 to your computer and use it in GitHub Desktop.
Bykea - Create Token API
This file contains hidden or 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
/** | |
* 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