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

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
-
Hi @sachin_dalmia ,
It sounds like this may be due to your current level of access. Access to the Expense Creator API on behalf of employees requires some set-up from Expensify as we're required to:
- Make sure you're set up correctly, (using Domain Control, are a Domain Admin, are a Policy Admin etc...)
- Validate you are authorized internally to add data to other accounts on your domain.
If this is something you need, please reach out to [email protected] (and feel free to reference this Community Post too, so we know where you came from!)