How to access a Stitch API from Postman using API Key? The API works with “Anonymous Auth” but not sure how to use with Postman - Server key or User key?
This document https://docs.mongodb.com/stitch/authentication/api-key/#server-api-keys does not specify clearly how to use API Keys.
- Created a Atlas > Access Management > API Keys (assuming this is Server API Key)
- Created Stitch > Users (user API Key)
- Created a Stitch API
Tried this on Postman
Hello Suren.
I spent a whole day with the same problem that you have, in the image I show you how I solved it.
Thanks @Federico_Ettlin but still showing the same error?
i’m going to Stitch > Users > ReadAPIKey (server) and using the value under ID as the VALUE in POSTMAN.
With some help from Mongodb support… here’s the solution.
- Use the SERVER KEY - Created at Atlas > Access Management > API Keys
- Use the KEY: api-key; VALUE: in Postman HEADER.
- Do not use Postman’s “API KEY” option under Authorization
2 Likes