Skip to content

Latest commit

 

History

History

dotnet

Samsara OAuth 2.0 Example

This example shows how to implement OAuth 2.0 authorization flow with the Samsara API using .NET.

Prerequisites

  • .NET 6.0 or higher
  • A Samsara account with dashboard access
  • Your Application Client ID and Client Secret

Setup

  1. Clone this repository

  2. Create a .env file in the root directory.

cp .env.example .env
  1. Add your Client ID and Client Secret to the .env file.
SAMSARA_CLIENT_ID=your_client_id
SAMSARA_CLIENT_SECRET=your_client_secret
  1. Run the server
dotnet run
  1. Navigate to http://localhost:5000 in your browser.

Support

If you have any questions or need assistance with the samples, please ask a question in the Developer Community.