Mick Davies
Mick Davies

Reputation: 93

Laravel Xero The consumer was denied access to this resource

Xero Public API

Laravel 5.6

Continue to receive the following error call after approving access for Xero (my app name) to access my demo company in Xero. It returns with an oauth_token, oauth_verifier and org query parameters but fails when trying to hit the request in the gist below on line 74

https://gist.github.com/seivad/a54901974ec4064f8fe6665e11a86598

I can't find anything on their API site to advise what to do next...

Upvotes: 0

Views: 188

Answers (1)

Rich
Rich

Reputation: 344

Can I assume you're using the calcinai/xero-php library?

The only things I can think of here to check are:

  1. You're using the Public Application client. Is the app you've setup in Xero a Public Application, or a Private One?

  2. Are the services.config settings setup correctly to match your app credentials, and your callback domain that you are testing with?

  3. Is your session definitely persisting with the correct tokens? (might be worth seeing what the output of your session()->get() calls are on lines 67 and 68

For what it is worth, the oauth error descriptions for Xero are outlined here, but I don't see your one: https://developer.xero.com/documentation/auth-and-limits/oauth-issues

Upvotes: 1

Related Questions