Stream getById error

I got error when tried getById() to get existed stream, but getAll() is work perfectly.

erros log:
MoralisError [Moralis Stream Error]: [S0002] Incorrect network provided. Got “undefined”, Valid values are: “evm”, “solana”

MY_CODE

Reference:
https://docs.moralis.io/streams-api/reference/get-stream
https://docs.moralis.io/streams-api/reference/get-streams

for more information,
that “MORALIS_KEY” and “myId” value, I’m sure both correct. I already tested it with postman.

You can test directly in the swagger interface.

What version of the sdk you are using?

It looks like it works if you specify the network parameter and set it to evm

Great! Thanks @cryptokid
Could you attach the link to the reference that you used? I want to read for more explore.

Solved by add network key:

this is the swagger url: https://api.moralis-streams.com/api-docs/

for getting a stream by ID
https://api.moralis-streams.com/api-docs/#/EVM%20Streams/GetStream

in particular it should work with the sdk without having to specify that network parameter, we’ll have to investigate that

1 Like