Use this tag for issues with pre-request scripts in postman, use the "postman" tag for general issues
Questions tagged [postman-pre-request-script]
319 questions
1
vote
0 answers
Postman save response to variable from a schedule request
Is it possible to save a response to a variable from a schedule request thats run every hour?
I am getting every hour an bearertoken and I want to save it in my variable so I can automatically send a post call.
I created a schedule and used this…

Suntje
- 21
- 3
1
vote
2 answers
Codeigniter $this->input->post() returning NULL
I'm trying to use the inbuilt this->input->post('name') function when creating the Sign Up API in CodeIgniter, but this->input->post() returns an empty array.
I am using the same url on the browser and it works perfectly fine there but when I try to…

Naqvi
- 13
- 5
1
vote
1 answer
Postman Get Azure Synapse Bearer Token
I am trying to get a Azure Synapse Bearer Token using Postman. I've followed this Postman link/video and have successfully called:
Azure Management Rest API:…

G. Young
- 41
- 1
- 7
1
vote
1 answer
Need to avoid manual clicking GETNEWACCESSTOEKEN Button in postman
My current project is Oauth 2.0 autho based.At postman,I can generate accesstoken using #Getnewaccesstoken button for my collection.
I dont want to click the generate token button in every time...Is any option there in prerequiste script form for…

IshuVisha
- 13
- 3
1
vote
1 answer
Postman Pre-request Script for runner
I know I can add a Pre-request Script for a collection or for a specific request.
I want to know if there is a way to do such a thing for a whole runner. I need it since I want to do pm.collectionVariables.unset("myVar") just once before my runner…

Tom Carmi
- 385
- 1
- 5
- 18
1
vote
1 answer
unable to load and eval javascript code in postman pre-request
I am trying to load external javascript in the pre-request tab of postman request by following the steps mentioned in https://blog.postman.com/adding-external-libraries-in-postman/ but seems like it is not working. Below is the code I am trying and…

Venu
- 1,513
- 3
- 19
- 37
1
vote
0 answers
Creating HMAC Hash with CryptoJs
I need to create a signature using a sha256 HMAC algorithm for my API request. The message to be encrypted is a concatenation of timestamp, uppercase http method, URI without hostname + request body if there is one.
I have tried the…

sev
- 1,500
- 17
- 45
1
vote
1 answer
Multipart/Realted API request in POSTMAN
I need to know the setup process of multipart/related file upload API request in POSTMAN.
I have the following details
API url :- https://apiq-jmqny-ste.azpre-api.net
json body :- {
"token" : "aqop094567",
"flow" : "work"
}
pdf file :-…

avidey
- 19
- 2
1
vote
1 answer
Postman request body appears as [object Object]
I'm trying to run the Postman collection runner with the following JSON file:
[
{
"articles": [
{
"created_date": "2019-04-09T12:00:00Z",
"author_id": "4421-45V2-1909-2404-0143-J9936",
…

Mathisha Karunaratne
- 41
- 1
- 5
1
vote
0 answers
Postman: Is there a way to read browser's localStorage values in Postman
After logging into the website, I need to make a POST call in Postman but the URL requires an userID which is stored in the browser's localStorage after login (refer to screenshot). The login API call does not return the userID in the response. Is…

Afsal
- 404
- 3
- 7
- 24
1
vote
1 answer
Postman: Get bearer token from collection authorization in pre-request script
In postman I have a collection, where each request uses collection-level Bearer Token authorization.
Now, what I would like to do is to send http request in my pre-request script (For refreshing access token), but I don't know is it possible to get…

Boris Boskovic
- 113
- 2
- 8
1
vote
1 answer
Setting timeout for postman collections
I want to run the Postman collection with timeout enabled at the collection level.
Is this setting possible at the collection level in Postman?
I know that the timeout can be set per request using setTimeout(() => {}, 15000), but I could not find…

Sandeep Pandey
- 184
- 1
- 17
1
vote
1 answer
How can we set dependency in pre requisite of Postman Automation?
I have 2 Postman scripts:
Issue offer
Redeem offer
Redeem offer API is dependent to the Issue offer API. So, everytime to run redeem offer, we need to run first Issue offer.
To do this how can we add issue offer to the Pre-requisite of Redeem…

Ash28
- 85
- 1
- 1
- 11
1
vote
0 answers
How to properly integrate Mongoose relational database
can you help me look at this code to find out where I am making it wrong ?
I have my mongoose schema that am referencing child. What I want is to create a user and embed his payment details as a reference. my current result now, allows me to create…

Ahmad Salihu
- 55
- 1
- 6
1
vote
1 answer
Running a postman-collection only starts the first one
I have a postman collection with 3 requests in it. When I click on "Run Collection" normally all 3 requests are sent. Yesterday I figured out that only the first one is triggered, the others are ignored. I have cloned the collection, I have…

SoS
- 774
- 1
- 7
- 19