Search code examples
sessionpostpostman

How to set a session id in Postman


I need to hit a post request to an API service which requires a session id along with other parameters in its post request field in order to get the required information.

I am using Postman to test this API.

I would like to know how to send a 'session id' in a post request when using Postman?

I am aware of pre-request script in Postman, but I am unaware of how to use the variable in post request.


Solution

  • In Postman native app:

    1. Turn on the Interceptor
    2. Go to Headers
    3. Fill-in a header entry with
      1. Key: Cookie
      2. Value: sessionid=omuxrmt33mnetsfirxi2sdsfh4j1c2kv