How to get the policyID of a particular user via useremail?

Options
sachin_dalmia
sachin_dalmia Expensify Customer Posts: 1

I am trying to use this API doc as the reference.

So, I need to get the policyID of a user using userEmail, but when I do enter the userEmail, it gives me 401 error.

Not authorized to authenticate as user <username>@<domain>.com

url: https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations

request body:

requestJobDescription: {
"type":"get",
"credentials":{
"partnerUserID": "<id>",
"partnerUserSecret": "<secret>"
},
"inputSettings":{
"type":"policyList",
"userEmail":"<username>@<domain>.com"
}
}

FYI: If I remove the userEmail from the requestbody, I can access all the policyID for the domain.

Answers