Xero sending the browser back
GET
/xero/callback
const url = 'https://example.com/xero/callback?state=example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://example.com/xero/callback?state=example'Not for calling by hand. Finishes the connection begun by /xero/connect and redirects to the accounting settings page.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”code
string
state
required
string
error
string
Responses
Section titled “Responses”Back to the accounting settings
Not a state we issued
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}Xero is not configured on this installation
Media typeapplication/json
object
error
required
string
message
required
string
Example
{ "error": "not_found", "message": "Customer not found"}