I am getting an error connecting to the Blockfrost API with blockfrost-js

"Network token mismatch. Are you using token for the correct network? See https://docs.blockfrost.io/#section/Available-networks."

I went to blockfrost.io and requested a API key for the testnet, but I still have this error. What to do?

1 Answer 1


To connect to the Testnet with blockfrost-js initialize it like this:

const API = new BlockFrostAPI({
  isTestnet: true

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.