sssurii
sssurii

Reputation: 830

Problem with Integrating Xero API with Laravel using public App - manual action required

I am integrating the Xero api using public app with my laravel project which is a API project. I have gone through the xero documentation, and official youtube video (https://youtu.be/BzZpgSHdKfU) for xero-api integration.

I am using library calcinai/xero-php and referring to: https://github.com/calcinai/xero-php/blob/master/examples/public.php

Here i am facing an problem while integrating the api because after hitting /oauth/RequestToken endpoint, it required a manual action which is opens oauth/Authorize?oauth_token={oauth_token} (here oauth_token received in earlier request) to get a OTP or oauth_verifier code to complete authentication process.

In my project i want to do whole authentication process at back-end which i believe not works because of the manual action required. May be i perceived and doing it wrong way, Please suggest me right way or any alternate.

manual action -> hitting the url from browser.

Thanks in advance.

Upvotes: 0

Views: 771

Answers (1)

Tom Bryant
Tom Bryant

Reputation: 175

You need to read about the different application types at https://developer.xero.com/documentation/getting-started/api-application-types. What you've linked is a public application which requires the user to click to authenticate and provides your application with 30 minutes of access.

For permanent access to a Xero account, you need to use a private application and setup access for each Xero account through https://developer.xero.com/myapps.

Upvotes: 1

Related Questions