Click HERE to see how Saviynt Intelligence is transforming the industry. |
07/23/2024 05:57 AM - last edited on 07/24/2024 12:12 AM by Sunil
Hi Team,
We are connecting to an application via Rest api's which expects to pass the username and password in the call.
When tested via postman we have to pass it under Authorization tab as basic authorization and it doesn't work when we try to pass the data in Headers or params.
we have tried the below JSONs but still didn't worked.
1) Trying to pass the username & password in params in Account import JSON
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://domain/api/persons?query=networkLoginName=='aa '",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {},
"httpParams": {
"userName": "${connection.userName}",
"password": "${connection.password}"
}
},
"listField": "",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "networkLoginName~#~char"
}
}
}
}
}
2) Tried to pass the username and password in headers
{
"accountParams": {
"connection": "acctAuth",
"processingType": "SequentialAndIterative",
"call": {
"call1": {
"callOrder": 0,
"stageNumber": 0,
"http": {
"url": "https://domain/api/persons?query=networkLoginName=='aa '",
"httpContentType": "application/json",
"httpMethod": "GET",
"httpHeaders": {
"userName": "${connection.userName}",
"password": "${connection.password}"
}
},
"listField": "",
"keyField": "accountID",
"statusConfig": {
"active": "true",
"inactive": "false"
},
"colsToPropsMap": {
"accountID": "id~#~char",
"name": "networkLoginName~#~char"
}
}
}
}
}
In both the cases we are getting 401 error as it was unable to pass the data in the API call.
Can anyone help us with a sample JSON that can used in this case.
Thanks & Regards,
Mohit.
[This message has been edited by moderator to mask URL]
07/23/2024 09:00 AM
Please share postman screenshot and curl command [Refer https://codingnconcepts.com/postman/how-to-generate-curl-command-from-postman/ ]
⚠️‼️‼️Do not upload any attachments that contain sensitive information, such as IP Addresses, URLs, Company/Employee Names, Email Addresses, etc.‼️‼️⚠️
07/23/2024 10:58 PM
Hi Rushikesh,
It got resolved. Thanks for the support.
Regards,
Mohit.
07/24/2024 12:18 AM
@Mohit_Sanka To help others who may have a similar issue, could you please share the issue cause and its solution?