Are you receiving SNAP/EBT benefits? The Expensify.org/SNAP-VAX campaign is live and accepting new members. Learn more about receiving $50 for submitting a SNAP receipt and $50 for getting your COVID-19 vaccine here and join today!

Admin Capabilities Within the API

Mads
Mads Expensify Customer Posts: 9 Expensify Newcomer
edited August 2018 in Integrations and API

I get the following response when I try to load expenses on behalf of employees
I am Admin

{"responseMessage":"Not authorized to authenticate as user [email protected]","responseCode":401}

:s

curl -X POST 'https://integrations.expensify.com/Integration-Server/ExpensifyIntegrations' \
    -d 'requestJobDescription={
        "type":"create",
        "credentials":{
            "partnerUserID": "aa_accounts_company_com",
            "partnerUserSecret": "1234567890987654321abc"
        },
        "inputSettings":{
            "type":"expenses",
            "employeeEmail":"[email protected]",
            "transactionList": [
                {
                    "created": "2018-05-01",
                    "currency": "ZAR",
                    "merchant": "E TRAVEL                NEWLANDS",
                    "amount": 1253,
                    "policyID": "760D782BC0CE2AB0",

                },
                {
                    "created": "2018-05-02",
                    "currency": "ZAR",
                    "merchant": "Name of merchant 2",
                    "amount": 2211,
                    "policyID": "760D782BC0CE2AB0"
                },
                {
                    "created": "2018-05-07",
                    "currency": "ZAR",
                    "merchant": "Name of merchant 3",
                    "amount": 443,
                    "policyID": "760D782BC0CE2AB0"
                    }
                }
            ]
        }
    }'

Best Answer

  • Ted Harris
    Ted Harris Expensify Success Coach - Admin Posts: 335 Expensify Team
    edited February 2019 Accepted Answer

    Hi @Mads - just checking in here to make sure everything is back on track now that we've hopefully set you up:

    to load expenses on behalf of employees.

    To note: access to the Expense Creator API on behalf of employees requires some set-up from Expensify as we're required to:

    1. Make sure you're set up correctly, (using Domain Control, are a Domain Admin, are a Policy Admin etc...)
    2. 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!)

    Once we've verified this, we create a request for our engineering team to allow the access you need. This can typically take 2-3 working days, although it may be faster!

    Once that's completed, we'll reach back out and you should be good to go like @Mads here!

Answers