Your question may already have an answer on the community forum. Please search for related topics, and then read through the guidelines before creating a new topic.
Here’s an outline with best practices for making your inquiry.
My question :
I have api integration, but I can’t understand how to make it in postman, please help me
Details (like screenshots) :
API doc : LineBank_API_spec_DebitCardDev_201111.pdf - Google Drive
How I found the problem :
I’ve already tried :
I already tried, but still error T.T
w4dd325
(w4dd325)
February 24, 2022, 3:17pm
2
Hi @satellite-administr3
Your headers are plain text but the documentation says they need to be base64 encoded;
You could do this in the “PreReq” tab using;
let myVal = pm.collectionVariables.get("string");
var encodedData = btoa(myVal);
console.log(encodedData);
“string” would be set as a collection variable with the following string of data (taken from the example doc, change to your values as appropriate );
{"globalId":"20190131GIBLnbPTGLBS000000000701","langCd":" EN","sysCd":"PT","instCd":"1234", "ipv6Adr":"172.16.158.86",
"chnlType":"LNA","mediaCd":"12","deviceId":"DB9267B0B6D63A10","mobileOsCd":"A8.1","reqUrlAdr":"/v1/sign/01101","reqTs":"15
52901544869","svcId":"01101"}
Example;
Hi @w4dd325 thanks for response
I tried but still error, can you tell me where is the problem?
Good one @w4dd325 , @satellite-administr3 referring your screenshot there is issue with pre-request script. Can you share your pre-request script?
@sahuvikramp is is my pre-req :
let myVal = pm.collectionVariables.get(“string”);
var encodedData = btoa(myVal);
console.log(encodedData);
@satellite-administr3 looks like variable value is not available, please try saving your request and give it a shot.
1 Like
I tried still error @sahuvikramp @w4dd325
can you share full this postman script? @w4dd325
w4dd325
(w4dd325)
March 1, 2022, 1:05pm
9
The “full script” is everything i shared in code above.
A variable with your params
and then the pre-req script.
Can you share what you tried with screenshots and the output in console?
1 Like
@w4dd325
variable:
test:
Error:
There was an error in evaluating the test script: TypeError: Cannot read property ‘toString’ of undefined
w4dd325
(w4dd325)
March 4, 2022, 9:29pm
11
I managed to recreate your error by “not saving the variable”.
Make sure you have saved the changes before submitting the call.
1 Like