I am getting DwollaException while generating access token in android app. I have added “com.github.Dwolla:dwolla-v2-kotlin:0.6.0” dependencies to my project.

val dwolla = Dwolla(
key = “example-client-key”,
secret = “example-client secret”,
environment = DwollaEnvironment.SANDBOX // defaults to PRODUCTION

val response = dwolla.post(“https://api-sandbox.dwolla.com/token”, JsonBody(
“grant_type” to “client_credentials”
), Headers(“Authorization” to “Basic Base64(example-client-key:example-client-secret)”,
“Content-Type” to “application/x-www-form-urlencoded”) )

NOTE:I have not entered my valid client-key and client-secret here.

I am getting DwollaException when dwolla.post() is executed. Please suggest.

Hi @Ankit-Kumar – Dwolla’s Kotlin SDK is intended for server-side use and should not be used by itself when developing client-side Android apps. Instead, this SDK should be installed on your web server with your Android app proxying any interaction with Dwolla through it.

Hi @shreya - I realy appreciate your help and quick response.Thank you for clearing my understandings.I am also sorry for late response.

Hi @Ankit-Kumar – that’s not a problem! :slight_smile: