Open Id - API Calls

riviereg16 days ago

Hi,

First thank you for this software, it's really a very nice software.

I'm trying to integrate a tracker on my App using the Traccar API. My App is using OpenId and I successfully run Traccar and Traccar Web with OpenID (I'm using keycloak as an open id provider).

I can log on the Traccar Web App using the Open Id settings, but I'm trying access directly the API from an Authenticated client with my OpenId provider (Keycloack)

My Question is: how can I use an OpenId bearer token to make Traccar API calls? If It's possible, is there any documentation for this ?

Guillaume

Anton Tananaev16 days ago

Normally you don't login with OpenID using API directly. Because it requires user action. The more typical flow is login through the web app and generate an API token you can use in the API.

riviereg16 days ago

Hi, thank you for your reply. In our case, the user log in to our OpenId provider and get Token for our App, then use it for all our services. Is there a way to use this OpenId token and request a Traccar API token without having the user login a second time on the traccar web app ?

Anton Tananaev16 days ago

I don't think that's part of the OpenID flow. It sounds like something else entirely.

riviereg15 days ago

Hi Anton,

Thank you for this reply, I went through the flow and I understand it better now. For the client (It's a mobile application) I will request an authorization code on my openid provider with the redirect uri to the traccar API to get the final auth token for the API.

Guillaume