Psionman
Psionman

Reputation: 3699

How to connect Insomnia to local Fauna database

I have a local Fauna DB and I can interact it with it using Fauna shell and using my own programmatic interface

However I am trying to use the Insomnia GUI and I cannot work out how to connect

This is my Fauna endpoint information

Admin endpoint: 127.0.0.1:8444
Replica name: NoDC
FaunaDB is ready.
Network Host ID: 172.17.0.2
Cluster name: fauna
API endpoint: 0.0.0.0:8443
API(plain) endpoint: 0.0.0.0:8445

And my Insomnia query

enter image description here

This gives an Unauthorized error

What should I do?

Upvotes: 0

Views: 128

Answers (1)

ptpaterson
ptpaterson

Reputation: 9593

Fauna uses Bearer token authorization. You can either set the Authorization header to Bearer YOUR_SECRET or set the secret in Insomnia's Auth tab.

Screenshot of setting bearer token for Fauna in Insomnia

I also recommend setting the header X-FaunaDB-API-Version: 4, which is the latest. Otherwise, the API will default to v2.

screenshot of setting headers for Fauna in Insomnia

Upvotes: 0

Related Questions