# Postman API works only with X-Api-Key request header

**URL:** <https://community.postman.com/t/postman-api-works-only-with-x-api-key-request-header/11580>\
**Category:** Help Hub\
**Tags:** postman-api\
**Created:** [March 28, 2020, 2:38pm UTC](https://community.postman.com/t/postman-api-works-only-with-x-api-key-request-header/11580 "2020-03-28T14:38:33Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![UAlee](https://avatars.discourse-cdn.com/v4/letter/u/bc79bd/32.png) [@UAlee](https://community.postman.com/u/UAlee)\
**Post date:** [March 28, 2020, 2:38pm UTC](https://community.postman.com/t/postman-api-works-only-with-x-api-key-request-header/11580/1 "2020-03-28T14:38:33Z")

</div>

Hello  
My issue is that with the same API key, when I request /collections endpoint with **X-Api-Key** in the request header, it works like fine. but when I do with **apiKey** parameter  
GET [https://api.getpostman.com/collections/?apiKey=myAPIKey](https://api.getpostman.com/collections/?apiKey=myAPIKey)  
It responds with a 401 “message”: “Invalid API Key. Every request requires a valid API Key to be sent.”.  
I made my api key in collection variables to ensure it is the same. can anyone point me to the issue here please ?

 ![sPv7jRucjC](https://us1.discourse-cdn.com/getpostman/original/2X/b/bd680cdf5c9e17a25d0a4d09a04efb38748ad424.gif)

Many thanks !

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [March 28, 2020, 2:50pm UTC](https://community.postman.com/t/postman-api-works-only-with-x-api-key-request-header/11580/2 "2020-03-28T14:50:20Z")

</div>

Hey @UAlee

Welcome to the community! 👋

Have you tried the same request, with the Auth token in the URL but removing the trailing forward slash before the `?`

Or going to the request settings and disabling the Cookie Jar?

Just trying the think or some different things to try 😁

---

<div class="post-metadata">

**Author:** ![UAlee](https://avatars.discourse-cdn.com/v4/letter/u/bc79bd/32.png) [@UAlee](https://community.postman.com/u/UAlee)\
**Post date:** [March 28, 2020, 3:16pm UTC](https://community.postman.com/t/postman-api-works-only-with-x-api-key-request-header/11580/3 "2020-03-28T15:16:03Z")

</div>

Hi @danny-dainton  
Thank you !  
I tried that with [https://api.getpostman.com/collections?apiKey={{apiKey}](https://api.getpostman.com/collections?apiKey=%7B%7BapiKey%7D)}  
And disabled then enabled the cookie jar but in vain  
I don’t think it is related to Postman client. I tried the request in browser and with vs rest client, always in vain 😥

could you try to reproduce it please ?

btw, all of that to make your newman slack bot work with the Postman API 😃

---

<div class="post-metadata">

**Author:** ![UAlee](https://avatars.discourse-cdn.com/v4/letter/u/bc79bd/32.png) [@UAlee](https://community.postman.com/u/UAlee)\
**Post date:** [March 28, 2020, 3:45pm UTC](https://community.postman.com/t/postman-api-works-only-with-x-api-key-request-header/11580/4 "2020-03-28T15:45:11Z")

</div>

Sorry @danny-dainton or this disruption it is apikey not api **K** ey  
that was driving me crazy 😅

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [March 28, 2020, 3:48pm UTC](https://community.postman.com/t/postman-api-works-only-with-x-api-key-request-header/11580/5 "2020-03-28T15:48:11Z")

</div>

I had literally just seen that and was about to reply 😁

I went through one of my old projects and saw that it’s a lower case `k`

---

<div class="post-metadata">

**Author:** ![rahul.singh](https://avatars.discourse-cdn.com/v4/letter/r/71c47a/32.png) [@rahul.singh](https://community.postman.com/u/rahul.singh)\
**Post date:** [July 23, 2021, 12:10pm UTC](https://community.postman.com/t/postman-api-works-only-with-x-api-key-request-header/11580/6 "2021-07-23T12:10:21Z")

</div>

Mann! i got myself driven crazy because of the same thing. damn!

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [August 23, 2023, 3:47pm UTC](https://community.postman.com/t/postman-api-works-only-with-x-api-key-request-header/11580/7 "2023-08-23T15:47:25Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
