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.