[SOLVED] Moralis.Network.ApiException: 'Error calling Challenge:

i am using c# sdk following code below:
var resp = await MoralisClient.AuthenticationApi.AuthEndpoint.Challenge(req, ChainNetworkType.evm);
it got error: Moralis.Network.ApiException: 'Error calling Challenge: '
it was working fine since 22/01/2024
i need your help for this issue
thank you and regards!

Hi @paoli

Can you please share the request params values that you used with the function?

hi @johnversus i am using like this

The expiration time should be in iso string format. So 120 is the not the accepted value for it.
Can you try replacing it with correct value.

You can find more details on the below docs for the accepted param values and its types

yes i tried like this but it got the same issue

The param value look ok to me. Can you once try testing with the same params in the docs and see it runs successfully? Use your API key when testing.

i use chainId 56 as bsc network but i got this message on your test page and i also using metamark to sign in already

I am not sure I understand. Any issue with that?

hi @johnversus because i have signed in already
ChallengeResponseDto resp = await MoralisClient.AuthenticationApi.AuthEndpoint.Challenge(req, ChainNetworkType.evm);
this lib seem not working
version 2.0.6 beta


but on your page test it is version 2.2

The c# sdk is not under development so it might have many outdated endpoints, bugs. So if possible please try using the API endpoints directly.

Here are the sagger docs of auth API
https://authapi.moralis.io/api-docs/#/

i integrated my app with the sagger docs of auth API https://authapi.moralis.io/api-docs/#/, it worked fine now, thank you so much @johnversus

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.