Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set a session id in Postman

Tags:

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.

like image 856
VoidZero Avatar asked Aug 05 '16 07:08

VoidZero


People also ask

How do I use session authentication in Postman?

With a request open in Postman, use the Authorization tab to select an auth type, then complete the relevant details for your selected type. The correct data values will be determined by your API at the server side. If you're using a third party API, refer to the provider's documentation for any required auth details.

How is session ID created?

Every time an Internet user visits a specific Web site, a new session ID is assigned. Closing a browser and then reopening and visiting the site again generates a new session ID.

What is session ID in REST API?

A session is created when client calls Login API and stays active until it times out or is logged out. When the session is created, a session ID that looks like a GUID is generated and assigned to it by the server. It is returned to the client in an HTTP header called X-egain-session .


1 Answers

In Postman native app:

  • Turn on the Interceptor.
  • Go to Headers
  • Key: Cookie
  • Value : sessionid=omuxrmt33mnetsfirxi2sdsfh4j1c2kv
like image 179
user2858738 Avatar answered Sep 21 '22 05:09

user2858738