C# .NET Moralis SDK Error

I’m using SDK from: https://github.com/MoralisWeb3/web3-dotnet-sdk
SDK version: 2.0.6-beta

I try to use function from C# .NET Moralis Api SDK:

string contractHash = “0xb47e3cd837ddf8e4c57f05d70ab865de6e193bbb”;
var nftC = await MoralisClient.Web3Api.Token.GetAllTokenIds(contractHash, ChainList.eth);

and i get error:

“message”: “Error calling GetAllTokenIds: Bad Request {“message”:“format must be a valid enum value”}”

Hi @midware

Can you try using the API endpoints directly? Our c# sdk is outdated and it is no longer in development. So I recommend using the API endpoints directly.


oh, thats bad for me, need to rewrite all my code :confused:
Can you show me example in C# .NET REST API how to implement your API endpoint in backend API endpoint with Moralis API-KEY credentials?

Hi @midware In case if you are familiar with postman application, you can try to import our API config json. Postman generates a sample code for https requests using the API swagger json.