Giter VIP home page Giter VIP logo

xero-node-oauth2-app's Introduction

Xero NodeJS OAuth 2.0 App

This Node project demonstrates how to use the https://github.com/XeroAPI/xero-node SDK.

Its purpose is to help javascript developers looking to build amazing applications with the data of users of the Xero Accounting platform: https://xero.com/. Secure authentication is setup using industry standard OAuth2.0. Access tokens fuel authorized api calls.

Setup

git clone [email protected]:XeroAPI/xero-node-oauth2-app.git
cd xero-node-oauth2-app

Configure with your credentials

Create an API app in Xero to get a CLIENT_ID and CLIENT_SECRET.

  • Create a free Xero user account (if you don't have one)
  • Login to Xero Developer center https://developer.xero.com/myapps
  • Click "New App"
  • Enter your app details (the redirect URI for this app is: http://localhost:5000/callback) This URI does not need to be Internet-accessible.
  • Click "Create App"
  • Click "Generate a secret"
  • Create a .env file in the root of your project or rename & replace the vars in the provided sample.env file

touch .env

CLIENT_ID=...
CLIENT_SECRET=...
REDIRECT_URI=http://localhost:5000/callback

The redirect URI configured for the app created at https://developer.xero.com/myapps must match the REDIRECT_URI variable otherwise an "Invalid URI" error will be reported when attempting the initial connection to Xero.

Build and run

npm install
npm run start-dev

THIS APP WILL INTERACT WITH YOUR XERO ORG DATABASE. DO NOT CONNECT TO IT WITH A PRODUCTION ACCOUNTING ORG!

Set up a Demo Company if you plan on exploring all the routes: https://developer.xero.com/documentation/getting-started/development-accounts

Project structure

The project is best explored by cloning/running the app. While we've tried to keep dependencies at a minumum, we have chosen certain tools such as express and jwt-decode to make it easier to show practical usage of the SDK.

The bulk of the helpful code is in src/app.ts - each SDK function is grouped by its corresponding object model and can be read about in more depth in the corresponding API set's documentation on our developer portal: https://developer.xero.com/documentation/api/api-overview

We've done our best to make each route idempotent. Most routes will run through the group of CRUD like actions for each model, showing practical usage for most every API interaction you might need.

For example the Invoices endpoint (router.get("/invoices") will show the all data dependencies you will often be required to interact with in order to successfully interact with that endpoint. ex. How to import and setup expected types, structuring of params contact: { contactID: contactID }, or dependent objects or expected account codes that are not always obvious due to the complexity of financial accounting data.

However, please be aware that based on the Organisation region, chart of accounts, or other data discrepency that certain routes may return an error. If its not obvious by the validation error, ex. "Account code '500' is not a valid code for this document." please raise an issue and we will try to get it sorted for you.

Token Management

Since typescript will recompile each time the src directory is saved this can be a painpoint as the session is wiped out for each server change which includes the tokenSet. To help with this we've set it up to store your previous session in a /sessions/ file as a low tech/dependency database for this repo. This will enable you to persist the tokenSet, and other utilized data such as the activeTenant between re-compiles.

Occasionaly the file based session storage can get out of whack -UnhandledPromiseRejectionWarning: #<Object> If you find node hanging on that you can simply delete the sessions in that /sessions/ folder and start fresh.

IMPORTANT

Between each session restart - you will need to visit the root route "/" in order to set the session back onto the XeroClient

We recommend setting up a proper datastore in your production usage of the xero-node project.

Multiple Organisations

Once you have connected to a Xero org, to connect to an additional org by clicking the Xero logo in the header. This will take you through the auth flow where you can select additional orgs to authorize. You can then choose from a dropdown which tenant you would like to pass to your api calls. Having > 1 org authenticated will also unlock some functionality like the /disconnect route.

Debugging

API Errors will be returned on the response body in an array. If you are working with a batch endpoint like createContacts its possible there will be multiple validation errors returned which you can summarize to an array with a batch functions optional summarizeErrors parameter.

response.body.invoices[i].validationErrors

# example errors

"The TaxType code <taxType> does not exist or cannot be used for this type of transaction"
"Account code '<accountCod>' is not a valid code for this document."

Also be aware that due to the size of Xero's many API sets, return errors may be structured a bit differently depending on which API set you are working with.

Contributing

You are very welcome to add/improve functionality - we will continue to make improvements that show more complex API usage like filter/sorting, paginating, and will add more CRUD workflows as new API sets are added to the xero-node SDK. Please open an issue if something is not working correctly.

xero-node-oauth2-app's People

Contributors

eteroa123 avatar iamam34 avatar kensantoso avatar kodyxero avatar malisetti avatar markabrahams avatar neilrackett avatar rettbehrens avatar rjaus avatar serknight avatar sidneyallen avatar tnzzz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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

xero-node-oauth2-app's Issues

Receive "Invalid redirect_uri" error when clicking on "Connect to Xero" button

On running this app and connecting to http://localhost:5000 in a browser (Firefox and Chrome tested), I receive the home page fine. When I click on the "Connect to Xero" button, I receive an error page with text:

Sorry, something went wrong
Go back and try again.
If the issue continues, check out our Status Page.

Error code: 500 Error: unauthorized_client : Invalid redirect_uri

My .env file contains:
CLIENT_ID=''
CLIENT_SECRET=''
REDIRECT_URI='http://localhost:5000/callback'

Am running the app on a private address behind a NAT router. The router forwards TCP port 5000 back to port 5000 on my machine.

URI formats I have tried changing for the value of REDIRECT_URL are (reloading the app after each change):
http://localhost:5000/callback
http://:5000/callback
http://:5000/callback
http://:5000/callback
http://:5000/callback
https://localhost:5000/callback
https://:5000/callback
https://:5000/callback

Tried also with single quotes, double quotes, no quotes, and with or without a trailing empty line.

On a related note, it wasn't clear from the documentation whether the REDIRECT_URL needed to be connectable from Xero, although that was my assumption, hence trying with public addressing and port forwarding. I verified that the port-forward for TCP port 5000 worked from an external location.

TypeScript errors on fresh install

Not sure how this is happening on my machine when there's active development on the project, but I'm getting errors for everything referencing properties on req.session:

src/app.ts:XXXX:XX - error TS2339: Property 'activeTenant' does not exist on type 'Session & Partial<SessionData>'.

5109           req.session.activeTenant.tenantId,

Node version: 12.12.0
Cloned at: 7fc4517

Workaround

Add an ambient declaration for express and set ts-node to read declarations:

// src/typings/express.d.ts
import 'express'

declare module 'express' {
	export interface Request {
		session: Record<any, any>
	}
}
// tsconfig.json
{
 //...
  "ts-node": {
    "files": true
  }
}

Click "Try OAuth 2.0" not found on developer.xero.com/myapps and other issues getting started.

Click "Try OAuth 2.0" is not found.

image

Tried this.

  1. clone project

  2. npm install

  3. Create new .env file (Use a editor when on Windows as it doesn't let you make files starting with .)

  4. Create a new developer account for xero with default company.

  5. Login to developer.xero.com/myapps

  6. Click New app

  7. Enter App name must not already exist Example: Put YourName123456

  8. For OAuth 2.0 grant type select Auth code Web app

  9. Company or application URL: https://localhost
    Note: Validation won't let you have http.

  10. OAuth 2.0 redirect URI http://localhost:5000/callback

  11. Next

  12. Click Copy on the Client id field.

Paste it into your .env file.
PORT=5000
CLIENT_ID=....

  1. Click Generate Secret and Copy it into .env file
    CLIENT_SECRET=...

  2. Put Redirect URI into .env file
    REDIRECT_URI=http://localhost:5000/callback

  3. Click save in Xero myapps page and also save .env file

  4. Start the server npm run start-dev

  5. Goto http://localhost:5000

  6. Click Connect to Xero

  7. Choose the Organization (Demo Company for example highly recommended do not use this on a real organization/xero for dev/testing purposes only!)
    Note: If already connected, just click the Continue button and skip Step 20.

  8. Click Allow access

Tried following this and instructions in readme here.
https://devblog.xero.com/xero-oauth-2-api-whats-new-node-example-94715fc8ff19
But those did not work for me only the above did.

Problems:

Note: Clicking Invoices gives me an error.
The resource you're looking for cannot be found
In the console I see. (Using NZ xero)
Account code '500' is not a valid code for this document.

Branding Themes Forbidden

Bank Transfers, Journals, Receipts: Crashes app but is a known issue.
XeroAPI/xero-node#412

Items: A validation exception occurred

Linked Transactions: ValidationException
Account code '497' is not a valid code for this document.

Overpayments: A validation exception occurred
Account code '500' is not a valid code for this document.

Payment Services: AuthorizationUnsuccessful
insufficent_scope

Payments, Prepayments: A validation exception occurred
Account code '500' is not a valid code for this document.

Thoughts on improvements that could be made:
Need to re-auth after closing/re-running the app.

Would be nice if it persisted in a session or saved to Json file on disk the tokenSet as this would give an example of persisting the tokenSet for an authenticated access without needing to re-auth all the time.

Quotes: Just waits for very long time did not bother waiting for it to finish loading.

Reports: The resource you're looking for cannot be found

TaxRates: Validation Error, The report tax type is required.

Organisation page info if that helps any.

Name: Demo Company (NZ)
organisationID: 33ff53f4-41c5-4b9f-b3b8-3cb14dcfb2e2

aPIKey:
name: Demo Company (NZ)
legalName: Demo Company (NZ)
paysTax: true
version: NZ
organisationType: COMPANY
baseCurrency: NZD
countryCode: NZ
isDemoCompany: true
organisationStatus: ACTIVE
timezone: NEWZEALANDSTANDARDTIME
organisationEntityType: COMPANY
shortCode: !HjL-V
edition: BUSINESS```


Cheers for the example project however, time for me to look how this app works and add to a project I'm working on.

Invalid Client

I added client_id, secret and redirect URL in the .env file but i get error of invalid_client when authenticated.

issue in access_token refresh_token

I want to generate invoices with the help of API endpoints but for that need access_token.
I tested all sample codes of OAuth 2.0 from github repo's but all of that works when go to browser connect with xero account then i am getting access_token but i need token without going to browser or clicking buttons.
Is any API endpoint is available that i hit with client_id, client_secret or that API give me token ?

UnhandledPromiseRejectionWarning: AggregateError TimeoutError

Hey all,

Couple weeks back i began experimenting with this app to learn the xero sdk and it worked a treat. But since last week i'm getting these errors whenever i run the app. I initially thought I've messed up something, so today i tried running a fresh copy from here. Unfortunately even that failed.
This error is quite persistent and would not let me authenticate with xero. but sometimes authentication does happen and everything works thereafter.

Node - v12.16.1
NPM - 6.13.4
OS - Mint 18

(node:6088) UnhandledPromiseRejectionWarning: AggregateError: TimeoutError: Timeout awaiting 'request' for 2500ms at ClientRequest.<anonymous> (/home/chamara/Development/xero-node-oauth2/node_modules/openid-client/node_modules/got/source/request-as-event-emitter.js:176:14) at ClientRequest.origin.emit (/home/chamara/Development/xero-node-oauth2/node_modules/@szmarczak/http-timer/source/index.js:37:11) at Immediate.timeoutHandler (/home/chamara/Development/xero-node-oauth2/node_modules/openid-client/node_modules/got/source/utils/timed-out.js:63:11) TimeoutError: Timeout awaiting 'request' for 2500ms at ClientRequest.<anonymous> (/home/chamara/Development/xero-node-oauth2/node_modules/openid-client/node_modules/got/source/request-as-event-emitter.js:176:14) at ClientRequest.origin.emit (/home/chamara/Development/xero-node-oauth2/node_modules/@szmarczak/http-timer/source/index.js:37:11) at Immediate.timeoutHandler (/home/chamara/Development/xero-node-oauth2/node_modules/openid-client/node_modules/got/source/utils/timed-out.js:63:11) at rejected (/home/chamara/Development/xero-node-oauth2/node_modules/p-some/index.js:71:11) at /home/chamara/Development/xero-node-oauth2/node_modules/p-some/index.js:85:5 at processTicksAndRejections (internal/process/task_queues.js:97:5) (node:6088) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1) (node:6088) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Update readme to warn against using real xero account

Thanks for this app - it certainly helps with solid examples.

Although the readme suggests to "Create a free Xero user account (if you don't have one)" it doesn't make it clear that by clicking a link in the navbar it will create, update, delete items. People ordinarily expect buttons to update/delete.

That's fine and it's all an example but it would be nice to add a warning so that people don't have their real xero data updated by the sample app.

Apologies if I've misunderstood how it works.

Cannot try this app

Hi! Whenever I log into my Xero account and then allow access to this app, I get this error:
RPError: JWT not active yet, now 1583604078, nbf 1583604307

image

Unable to execute API - TypeError: Cannot read property 'access_token' of undefined

I've followed the instructions in the readme, but I'm unable to successfully execute any of the API's locally, and receive the error message below:

Screen Shot 2019-12-19 at 12 42 10 pm

I have my own (live) company, and a demo company, and I'm connecting to the demo company (from the list of available options). I have tried disconnecting and reconnecting the company, as well as clearing the cache, cookies, using an incognito browser, etc. The following warning also occurs when the app starts up:

Screen Shot 2019-12-19 at 12 41 09 pm

Any pointers to get the demo app up and running?

Thanks,

Marc

npm install issue

Getting the following fail:

Steps to reproduce:

pwd
/home/xx/GitHub/xero/xero-node-oauth2-app
nvm use 12.16.1
Now using node v12.16.1 (npm v6.13.4)
xx@SubZero:~/GitHub/xero/xero-node-oauth2-app$ 
npm install

Result

npm ERR! Verification failed while extracting [email protected]:
npm ERR! Verification failed while extracting [email protected]:
sha512-yn5aTswnUftXAsfHNait/aG8YGLBdOZOfb3RW0nAdgfJo5S2eO06cVJzPxRyPQzJAtySU2NvAqBF6yM1faXFew== integrity checksum failed when using sha512: wanted sha512-yn5aTswnUftXAsfHNait/aG8YGLBdOZOfb3RW0nAdgfJo5S2eO06cVJzPxRyPQzJAtySU2NvAqBF6yM1faXFew== but got sha512-LWU1HOJrzYkpVxfSCCILrNXPcUjtIznMWmUNRTH5ky3PgG9n3o6iliH6uHOEcVGB+pwfl+bpFMbGa2bddpG3Vg==. (1568560 bytes)```

npm install fails

sesh@IMCHLT359:~/xero-node-oauth2-app$ npm i
npm WARN EBADENGINE Unsupported engine {
npm WARN EBADENGINE package: '[email protected]',
npm WARN EBADENGINE required: { node: '12.12.0' },
npm WARN EBADENGINE current: { node: 'v14.15.4', npm: '7.12.0' }
npm WARN EBADENGINE }
npm WARN tarball tarball data for xero-node@file:/Users/chris.knight/code/sdks/xero-node/xero-node-4.12.0.tgz (sha512-OYXAZvOnT8/FsUF3ioc6NvCh9tj6oH8xzj65AEqeKXL2FojtLzzkyxXICjNiDE3lcZ9BrS612iUPuzctrNHupg==) seems to be corrupted. Trying again.
npm WARN tarball tarball data for xero-node@file:/Users/chris.knight/code/sdks/xero-node/xero-node-4.12.0.tgz (sha512-OYXAZvOnT8/FsUF3ioc6NvCh9tj6oH8xzj65AEqeKXL2FojtLzzkyxXICjNiDE3lcZ9BrS612iUPuzctrNHupg==) seems to be corrupted. Trying again.
npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /Users/chris.knight/code/sdks/xero-node/xero-node-4.12.0.tgz
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/Users/chris.knight/code/sdks/xero-node/xero-node-4.12.0.tgz'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent

npm ERR! A complete log of this run can be found in:
npm ERR! /home/sesh/.npm/_logs/2021-06-11T04_46_46_886Z-debug.log

Error when connecting application to Xero with default scopes

When connecting the application to Xero with the default scopes, I see the following error:

image

I contacted API support and they told me to remove the paymentservices scope and to try again. That fixed the issue and I was able to immediately connect to Xero.

I'm not sure what the underlying issue is, whether that's a scope that I don't have access to based on my role in my Xero orgs or if it's a restricted scope that only certain orgs have access to, but it would be helpful to have this fix documented here. I'm happy to open a PR to update the documentation if that is an acceptable fix.

npm install fails - invalid xero-node path in package-lock.json in master

sesh@IMCHLT359:/xero-node-oauth2-app$ which node
/home/sesh/.nvm/versions/node/v12.12.0/bin/node
sesh@IMCHLT359:
/xero-node-oauth2-app$ npm i
npm WARN tarball tarball data for [email protected] (sha512-OYXAZvOnT8/FsUF3ioc6NvCh9tj6oH8xzj65AEqeKXL2FojtLzzkyxXICjNiDE3lcZ9BrS612iUPuzctrNHupg==) seems to be corrupted. Trying one more time.
npm WARN tarball tarball data for [email protected] (sha512-OYXAZvOnT8/FsUF3ioc6NvCh9tj6oH8xzj65AEqeKXL2FojtLzzkyxXICjNiDE3lcZ9BrS612iUPuzctrNHupg==) seems to be corrupted. Trying one more time.
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/projects/models.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/files/objectGroup.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/files/objectType.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/accounting/onlineInvoice.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/accounting/onlineInvoices.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/payroll-au/openingBalances.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/accounting/organisation.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/accounting/organisations.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/accounting/overpayment.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/accounting/overpayments.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/assets/pagination.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/bankfeeds/pagination.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/payroll-nz/pagination.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/projects/pagination.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/payroll-au/payItem.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/payroll-au/payItems.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/accounting/payment.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/accounting/paymentDelete.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/payroll-au/paymentFrequencyType.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/payroll-nz/paymentLine.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/payroll-nz/paymentMethod.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/payroll-nz/paymentMethodObject.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/accounting/payments.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/accounting/paymentService.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/accounting/paymentServices.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/accounting/paymentTerm.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/model/accounting/paymentTermType.js.map'
npm WARN tar ENOENT: no such file or directory, open '/home/sesh/xero-node-oauth2-app/node_modules/.staging/xero-node-536913f3/dist/gen/api/payrollAUApi.js.map'
npm WARN [email protected] No repository field.
npm WARN The package fs-extra is included as both a dev and production dependency.

npm ERR! code EINTEGRITY
npm ERR! Verification failed while extracting [email protected]:
npm ERR! Verification failed while extracting [email protected]:
npm ERR! sha512-OYXAZvOnT8/FsUF3ioc6NvCh9tj6oH8xzj65AEqeKXL2FojtLzzkyxXICjNiDE3lcZ9BrS612iUPuzctrNHupg== integrity checksum failed when using sha512: wanted sha512-OYXAZvOnT8/FsUF3ioc6NvCh9tj6oH8xzj65AEqeKXL2FojtLzzkyxXICjNiDE3lcZ9BrS612iUPuzctrNHupg== but got sha512-aTTbvawQ9zxxxCYY/mTDZSWQbhZnHXoSXKHJ8wyV3FmEnV17SIDFegaJujpBvOBNyOf024Z5yJYqpct6FtqWYA==. (345001 bytes)

npm ERR! A complete log of this run can be found in:
npm ERR! /home/sesh/.npm/_logs/2021-06-11T05_27_10_136Z-debug.log

Verification failed while extracting [email protected]:

Node version: v12.16.3
Os : mac 10.14.1

Just get clone as readme, update .env and build run and getting this error:
npm ERR! code EINTEGRITY
npm ERR! Verification failed while extracting [email protected]:
npm ERR! Verification failed while extracting [email protected]:
npm ERR! sha512-yn5aTswnUftXAsfHNait/aG8YGLBdOZOfb3RW0nAdgfJo5S2eO06cVJzPxRyPQzJAtySU2NvAqBF6yM1faXFew== integrity checksum failed when using sha512: wanted sha512-yn5aTswnUftXAsfHNait/aG8YGLBdOZOfb3RW0nAdgfJo5S2eO06cVJzPxRyPQzJAtySU2NvAqBF6yM1faXFew== but got sha512-LWU1HOJrzYkpVxfSCCILrNXPcUjtIznMWmUNRTH5ky3PgG9n3o6iliH6uHOEcVGB+pwfl+bpFMbGa2bddpG3Vg==. (1568560 bytes)

Let me know if you require more information.

xero.accountingApi.emailInvoice Issues

I am trying to email the invoice with no joy, not seeing any sign of it in the App history on developer.xero

this is how I'm using it.

const createdInvoicesResponse = await xero.accountingApi.createInvoices('', createXeroInvoices); const emailInvoice = await xero.accountingApi.emailInvoice('',<string>createdInvoicesResponse?.body?.invoices?.[0]?.invoiceID, {});

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.