This sample is an example of how to create a JWT using Node.js when calling the DoorDash API. Additionally, it creates a delivery request using the JWT.
It builds a token that is valid for 30 minutes. Please obtain a set of DoorDash Credentials (Developer ID, Key ID, and Signing Secret) in the DoorDash Developer Portal to use in the application.
This application targets Node.js version 18.14.0. The code source and build files provided in this repository are samples and not intended for production, and are not supported.
Follow these steps to run the sample app:
- Clone repository locally.
- Open a terminal and change directories to the
test-app
folder. - Install jsonwebtoken (if not already installed) by running
npm install jsonwebtoken
in the test-app folder. - Install axios (if not already installed) by running
npm install axios
in the test-app folder. - Install crypto (if not already installed) by running
npm install crypto
in the test-app folder. - Run
node app.js
at the prompt. - Open your browser and enter the hostname and port provided in the app.js, such as
http://127.0.0.1:3000/
if you had used 127.0.0.1 for your host and 3000 for your port.
- auth0 JWT Debugger
- DoorDash API JWT JSFiddle Sample
- make-doordash-jwt CLI
- DoorDash API get started with Postman
- DoorDash SDK Example Application
Please join the DoorDash Developer Discord community to provide feedback and ask questions about developing with the DoorDash API.