As a Postman user, can my profile be used as a variable?

We share collections with multiple users. Some collections print reports. It would be valuable to be able to identify who ran a collection and generated a report.

Is it possible to save the user email of the person who ran the collection as a variable to print in the report?

For example: 1,000 results. 500 failed. Report ran by {{}}

Hi @wbuchanan . Welcome to the Postman Community.

Yes, this is very possible. The Postman API exposes an endpoint to get the currently authenticated user using their API Keys. You will have to integrate this endpoint into your workflow and each person running the collection needs to update their environment variables with their respective API keys.

The name, email, etc of the person who ran this collection can be gotten from this endpoint, stored in a variable and included as a part of the generated report.

Please let me know if you have any additional questions.

Hi @gbadebo-bello ,

Thank you for the quick reply! I was able to get an API Key and run the call for my own credentials.

QUESTION: Can you confirm: does each individual require their own API Key for this to function?

They need thier own personal API key to call that endpoint as if they were using a shared one, it would all be the same user.

1 Like

That makes sense. Thanks @danny-dainton

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