1

As in the title. I have scoured the Postman documentation and went through different nooks and crannies in Postman desktop app but I am unable to make my mock api server private.

I have generated a Postman API Key and I am passing it with all the requests in mock api as x-api-key header but it doesn't change anything. I can still access the collection's endpoints by simply pasting the url in the browser.

When I was creating the mock api server, I choose public option to speed up the setup but now would like to make it private.

codeepic
  • 3,723
  • 7
  • 36
  • 57

1 Answers1

1

If the Mock has already be created as a Public Server, you can make it Private by editing the Mock from the Collection menu in the app.

  • Press the > option on the Collection name
  • Select the Mocks tab
  • Select the Pencil icon to Edit the Mock Server
  • Check the Make this mock server private box
  • Press the Save Changes button

Once this has been changed to a Private Server, you should be able to call it only using the x-api-key token in the header.

Postman

More details can be found on the Postman Learning Center:

https://learning.getpostman.com/docs/postman/mock-servers/setting-up-mock/#editing-mock-servers

Danny Dainton
  • 23,069
  • 6
  • 67
  • 80