Example projects how to use the ecarup public API.
The ecarup API supports REST and GRPC. For new project we recommend to use gRPC
Docs: https://public-api.ecarup.com/swagger/index.html
gRPC is a high performance RPC framework. The protobuffer files needed you can find here: https://github.com/eCarUp/ecarup-api-examples/tree/main/ecarupApiExamples/ecarupGrpcApi/Protos
ecarup uses the smart-me / ecarup oauth Identity server. Before you can use the API you need to get an access token for the oauth server. An example how to do that you can e.g. find here: https://github.com/eCarUp/ecarup-api-examples/blob/main/ecarupApiExamples/ecarupGrpcApi/SmartMeEcarupOauthClient.cs
To use oauth you need to get an client_id and maybe a client_secret first. A guid how to do it you can find here: https://sites.google.com/smart-me.com/wiki-english/3rd-party-systems/ecarup-api#h.2jf3qbh1r69y
Simple console (.net C#) example how to use the ecarup gRPC API. The example uses the oauth client credentials flow to get an access token.
ASP.net Blazor Example with Code-First gRPC between Client (Webassembly) and Server). Uses the oauth Confidential flow.
- Use case: Web Apps that need access to ecarup for multiple users.
- Go to www.smart-me.com
- Login with your account that you want to use as account for your application
- Click on the username -> settings -> API & Access
- Create a new "Confidential" OAuth Application
- Enter the Redirect URL of your application. E.g. for the local development it will be https://localhost:7118/authorization-code/callback
- Click on create
- Copy the client id and the client secret into the appsettings.json in ecarupApiExamples\ecarupGrpcWebExample\Server\ in the oauth section.