0

I'm new to Xero development. I'm trying to make a simple API call to get all contacts from my clien't account.

I don't have the login details (user name & password) for the clien't account but I do have the Xero code from client which they have given me the required permissions.

So, the information I have are:

Xero Code: 447a225c95XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX359d
Xero Scope: openid profile email accounting.contacts accounting.transactions offline_access

I'm not quite sure how to access my clien't Xero account with above details. Tried the following in Postman but do do know which header parameters to pass.

enter image description here

How do I make the API call to get contacts with above details?

chamara
  • 12,649
  • 32
  • 134
  • 210
  • If you have a look on the Xero youtube channel there are some quite informative videos on how to connect up, what headers to send and so on. I've gone from "not a clue" to working OK now on OAuth2 based on one of them. https://www.youtube.com/channel/UC7DA_vntKKChsenzpL7QWPg/videos – droopsnoot May 10 '20 at 17:22

1 Answers1

1

It looks like you have the Oauth1 consumer token mixed up on the OAuth2.0 endpoint. If you are developing something new I 100% recommend you to setup authorization with OAuth2.0.

Also since you are using postman I encourage you to checkout our tutorials explaining how to get that setup: https://developer.xero.com/documentation/tools/postman

Please note that in order to connect API access you will need to have the email / password login for the xero user account you want to authorize API access for. You should setup a Demo Company and test this yourself. Please don't request your clients username/password to get access.

https://developer.xero.com/documentation/getting-started/getting-started-guide

SerKnight
  • 2,502
  • 1
  • 16
  • 18