Xero - beautiful accounting software

Xero Developer Help Center

Xero Developer Community

Community > API Authentication >

Get access token and authenticate my app without involving a user to login

Started by Van Nam Hoang -   in API Authentication

- I am integrating my app with Xero, and I need to write an automatic cron job to get Xero data hourly.

- But I can't find anyway to get access token without involving a user to login to my Xero account
And I can't find any documents about Authentication and Authorization API (which I can past on my account's credential and company ID to get access token and xero code or something like that)

- Can someone help me with this problem,

thanks!
Best Reply as chosen by Van Nam Hoang (Original Poster)
Currently all Xero APIs require apps to operate on behalf of a user. Connecting your app to a Xero account requires a user to grant consent in a web browser. This can be challenging if you’re building a back-end integration that doesn’t have a user interface. For integrations like these, our CLI tool XOAuth allows you to establish an offline connection with a Xero user’s account directly from the command line. No web development required.

Until the premium custom integration offering leveraging the client credentials grant type is ready, hopefully later this year, our recommended solution for machine-to-machine integrations is XOAuth.
 

Rett Behrens (Xero Staff)