fiskaly / fiskaly-sdk-java

fiskaly Cloud-TSE SDK for Java/JRE and Java/Android
MIT License
4 stars 0 forks source link

Internal error (failed to find matching key for verification) when using java sdk on `dev` environment #33

Open ghost opened 3 years ago

ghost commented 3 years ago

When I try to use java sdk to make a simple call to Fiskaly api on dev environment

    val apiKey = "API_KEY"
    val apiSecret = "API_SECRET"
    val client = FiskalyHttpClient(apiKey, apiSecret, "https://sign.fiskaly.dev/api/v2")
    println(client.request("GET", "/tss"))

I get exception:

Exception in thread "main" FiskalyClientException{ Code=-32603, Message=Internal error, Data="failed to find matching key for verification: failed to find matching key for key ID \"GZzxbuN8ZCafnK1xRWe08caWgXH9x1OMfOGWyyjrpS4\" in key set"}
    at com.fiskaly.sdk.factories.ExceptionFactory.buildClientException(ExceptionFactory.java:30)
    at com.fiskaly.sdk.FiskalyHttpClient.doInvoke(FiskalyHttpClient.java:205)
    at com.fiskaly.sdk.FiskalyHttpClient.request(FiskalyHttpClient.java:129)
    at com.fiskaly.sdk.FiskalyHttpClient.request(FiskalyHttpClient.java:188)
    at demo.MainKt.main(Main.kt:16)
    at demo.MainKt.main(Main.kt)

I'm trying with the latest 1.2.200 java sdk (tried on both Android and MacOS).