Ok. So the curl request it like this
curl --request POST \
--url https://authapi.moralis.io/challenge/verify/evm \
--header 'X-API-KEY: GDlFIJ8uIErqaQCfxxxxxxxxxxxxxxxxxxxxxxxxW36wjmwWb' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"signature": "0xbc53bf24906e51d0xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxf285171b",
"message": "deblog.club wants you to sign in with your Ethereum account:\\n0x41Dd2e751dF10b27356cd1790567Ba6C4B5d933b\\n\\nPlease sign this message to confirm your identity.\\n\\nURI: http://localhost:3000\\nVersion: 1\\nChain ID: 1\\nNonce: tL8ejuiK6RUFhPXrE\\nIssued At: 2022-09-27T16:55:03.381Z"
}
and it returns 400. Why?
response
{
"statusCode": 400,
"name": "Error",
"message": "Invalid message: {\"success\":false,\"state\":103,\"length\":276,\"matched\":0,\"maxMatched\":60,\"maxTreeDepth\":15,\"nodeHits\":258,\"inputLength\":276,\"subBegin\":0,\"subEnd\":276,\"subLength\":276}"
}
I regenerate the signature more than 10 times and try it. But the response is 400 every time. I think I input something wrong. Because the error message clearly says “Invalid message”