Skip to content

Latest commit

 

History

History
42 lines (27 loc) · 2.67 KB

README.md

File metadata and controls

42 lines (27 loc) · 2.67 KB

DoorDash API Kotlin Sample

This sample is an example of how to create a JWT using Kotlin 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 was built using Kotlin version 1.8.10, Amazon Corretto 17 JDK, and Gradle 8.0.1. The code source and build files provided in this repository are samples and not intended for production, and are not supported.

This sample uses an IntelliJ IDEA project. You may use different IDE, but this sample is configured for IntelliJ IDEA. If using a different IDE, the source you'll want to copy is in Main.kt.

Note, if you are building a new project, you'll need to make sure the jvmToolchain parameter is targeting at least version 11 in the build.gradle/build.gradle.kts. In this sample project, it targets version 17:

kotlin {
    jvmToolchain(17)
}

Running Sample

Follow these steps to run the sample app:

  1. Clone repository locally.
  2. Open the project located in the source/DoorDashAPIKotlinSample folder with IntelliJ IDEA.
  3. Open Main.kt in the editor and resolve all TODO items listed in comments, save changes.
  4. Build and run the application.

More About DoorDash Credentials

Related Utilities and Samples

Community

Please join the DoorDash Developer Discord community to provide feedback and ask questions about developing with the DoorDash API.