Skip to content
This repository has been archived by the owner on Feb 3, 2023. It is now read-only.
/ Xero-Postman Public archive

A Postman collection for authenticating to the Xero API

License

Notifications You must be signed in to change notification settings

XeroAPI/Xero-Postman

Repository files navigation

Xero-Postman

A Postman collection for authenticating to the Xero API. Please note that this collection provides access using OAuth 1.0a. Our newer collection using OAuth 2.0 can be found here.

Steps to get up and running

Follow these steps to quickly get up and running with the Xero API and Postman:

1. Import the Xero OAuth1a collection and Xero environment into Postman

Click the button below and select the Desktop version of Postman (Chrome extension doesn't support environment variables):

Run in Postman

2. Create a public app at https://developer.xero.com/myapps

Go to the Xero developer portal and create a public app.

Note Postman doesn't support the RSA SHA1 signing method so you can't use the partner or private app types.

create a public app

If you haven't already signed up for a xero account you can do so here.

3. Add your consumer key and consumer secret to the Xero environment variables in Postman

Copy the consumer key and consumer secret of your app into the ConsumerKey and ConsumerSecret environment variables in Postman.

get credentials

manage environment

4. Select the Xero environment

Select Xero from the environment drop-down menu in Postman

select environment

5. Get your request token

Hit Send on the GET Request Token call in Postman.

In the response section go to the Test Results tab and copy the authorization url.

GET request token

6. Get your oauth verifier

Paste the authorization url into your browser, login to xero, select the org to connect to and copy the oauth verifier to your clipboard.

GET oauth verifier

7. Get your access token

Select the Authorization tab, paste the verifier into the Verifier box under ADVANCED

GET access token

Congrats! You're now authenticated and can start making API calls. Your access token will last for 30mins, after which time you'll need to report steps 4-6 to get a new token.

8. Make your first API call!

Click Send on the GET Organisation request to make your first API call.

9. Import our OpenAPI definition

Now that you're authenticated, import the official Xero OpenAPI (Swagger) description and import all the endpoints for the Accounting API.

About

A Postman collection for authenticating to the Xero API

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published