WC1 Postman Collection - 401 due to missing pre-request scripts

I'm trying to get my Postman environment set up after moving to a new laptop. I imported the collection and my environments, however I now receive a 401 error when attempting to retrieve my groups. I recall the collection used to include pre-request scripts for generating the authorization code, however when I import the collections now, all of the pre-request scripts are empty. Is this a known issue with the API collection?

Best Answer

  • Hello @mkalgren - thank you for reaching out. Could you please clarify which account you are using (Pilot, Production, or Production1)? I only see that you have credentials for the Pilot account and I was able to get 200 successful HTTP response (I have blocked some of the names/ids for privacy):
    1706576328703.png

    As for the pre-request script being an issue with the API collection: I will confirm this with you tomorrow but as you can see, the 401 is not due to having a blank pre-request script. I just downloaded both V2 and V1 of our Postman collections and both have blank pre-request scripts, yet I am able to receive successful 200 HTTP responses.

    Once you clarify which account you are using, could you also send me the last 3 characters of your API key? You seem to have 2 different user logins within the Pilot account and one of the user logins is showing up as "INACTIVE". The inactive account will return a 401 response (as I have already tested it) and I would like to make sure you are using the correct account.

    Looking forward to your response!

    Blessings,
    Judith

Answers

  • This is Pilot - the API key I'm using ends in "73d".

    Thanks for the quick response and for confirming the pre-request script isn't the issue!

  • Hi @mkalgren - Thanks for confirming the API key. I used that same API to retrieve the results above (refer the screenshot I posted). I received a 200 successful response, as you can see. Are you still receiving a 401? Please ensure that you have copied and pasted the API credentials properly. If you are still facing issues, kindly send over the request and response headers while masking the API key. Thanks

  • Thank you for confirming. I attempted the same call again this morning, and it worked without issue. Not sure what the actual issue could have been yesterday - I didn't change anything before running it.
  • Okay, sounds great! If you have any related issues, please come back to this thread. Otherwise, feel free to post another question on the forum. Have a great day!

    Blessings,

    Judith