Rajesh
Rajesh

Reputation: 91

Identifying company - API

Xero-java-sdk: While make AccountingApi calls, there is no mention of the company name as parameters in the api call.

How does the javasdk know, which company the api is referring?

Upvotes: 0

Views: 37

Answers (1)

rustyskates
rustyskates

Reputation: 866

Each request to the API is made with an access token; that access token is specific to an organisation for which the user has authorised your app.

If your app is a private app, this authorisation is made during the app creation process in the developer portal. For public and partner apps, authorisation is the part of the flow performed after obtaining a request token - documentation here.

Upvotes: 1

Related Questions