Cannot get history

curl -X ‘GET’
‘https://api.moralis-streams.com/history?limit=100’
-H ‘accept: application/json’
-H ‘x-api-key: 21323’

Based on this one, I should get the history but it is unable to get the history detail. Now I have 3-4 transactions but I cannot check the history

Docs: https://api.moralis-streams.com/api-docs/#/History/GetHistory

in history you will see the failed webhook requests, if they are still there

it looks like there were no failed requests for that account based on stats:

{
  "totalWebhooksDelivered": 2,
  "totalWebhooksFailed": 0,
  "totalLogsProcessed": 0,
  "totalTxsProcessed": 2,
  "totalTxsInternalProcessed": 0,
  "streams": [
    {
      "streamId": "743629c0-2549-4f2a-877d-66871de0dafe",
      "totalWebhooksDelivered": 2,
      "totalWebhooksFailed": 0,
      "totalLogsProcessed": 0,
      "totalTxsProcessed": 2,
      "totalTxsInternalProcessed": 0
    }
  ]
}

How can we define the fail stream?

when a webhook request will fail for your webhook url (for example timeout o not returning status code 200), then the failed webhook request will be saved in that history

Hi,

Thanks for supporting. I have another question

https://takahaha.fun/api/v1/receive-message

I have this webhook to get the message. However, I don’t see any message to me.

Sample code in PHP

const verifySignature = (req, secret) => {

const providedSignature = req.headers["x-signature"]
if(!providedSignature) throw new Error("Signature not provided")
const generatedSignature= web3.utils.sha3(JSON.stringify(req.body)+secret)
if(generatedSignature !== providedSignature) throw new Error("Invalid Signature")

}

{“abi”:[],“block”:{“number”:null,“hash”:null,“timestamp”:null},“txs”:[],“txsInternal”:[],“logs”:[],“chainId”:null,“confirmed”:true,“retries”:0,“tag”:null,“streamId”:null,“erc20Approvals”:[],“erc20Transfers”:[],“nftTokenApprovals”:[],“nftApprovals”:{“ERC721”:[],“ERC1155”:[]},“nftTransfers”:[],“nativeBalances”:[]}api_key

Your signature:
0x9621e5727b079b8c52c4f045b5780f73848557faa3e383fef45b24d813019169

Could you please help me to take a look?

what is the connection to the signature? you should receive the webhook request, or you say that it throws an error because it can not validate the signature?

you don’t have to do any JSON.stringify there, only concatenate req.body with the secret

Is it a correct x-signature request?

"{"abi":[],"block":{"number":null,"hash":null,"timestamp":null},"txs":[],"txsInternal":[],"logs":[],"chainId":null,"confirmed":true,"retries":0,"tag":null,"streamId":null,"erc20Approvals":[],"erc20Transfers":[],"nftTokenApprovals":[],"nftApprovals":{"ERC721":[],"ERC1155":[]},"nftTransfers":[],"nativeBalances":[]}api_key"

can you post code on forum?
you can see here how to do it: READ BEFORE POSTING - How to post code in the forum

I can not copy what you pasted because it is not the original data there any more