Code Monkey home page Code Monkey logo

xero-postman's Introduction

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.

xero-postman's People

Contributors

admo26 avatar iamam34 avatar philals avatar sidneyallen avatar wobinb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

xero-postman's Issues

access-token rejected saying "the request could not be verified"

I get the oauth_verifier through request-token request. But access-token request comes back with 401 status and message "oauth_problem=token_rejected&oauth_problem_advice=The%20Request%20could%20not%20be%20verified".

I have confirmed that consumer-key & consumer-secret of my public account, are correct and valid - by logging into developer.xero.com/myapps.

I actually tried with 2 different public accounts - both were in working condition as of last week.

I know that XERO is moving to OAuth2, but it would be greatly appreciated with any help to get around this.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.