I have an app with a database that contains per animal ambulance each drive they made
From our gps trackers in the cars comes valuable info that I would like to add to my database drive entries, like destination, km driven and so on…
So far so good.
My gps tracker provider uses an API to connect to their servers.
the only way I can get calls to work in the Bubble API Connector and get my data is by means of Private key in header.
Key name: authorization and in key value goes my bearer token value like: Bearer: xxxxxxxxxx
I can access my data on their servers, that works fine.
But they have given me a client id, a client secret code, a system id that is blank, my username and my password to get my access token, refresh token and expiration time…
when I put them in a POST call with in the body section these 4 items I get a bearer token, a refresh token and a expire time. But with this authorizan I always get an expiration and get locked out when my token expires. But I can’t find a proper way to manage this.
I tried all kinds of authentication methods using these credentials but only Private key in header gives me access…
I cannot test myself, But I believe you cannot really use the custom token. This API seem to be a “password” grant type oAuth2 and this request to get access token first and after you can use the token endpoint. But there’s lack of documentation. Also, if you want to use custom endpoint. this must point to api/session/Token
I’m not sure you will be able to use the current Authentication and maybe you will need to manually handle this using API Call. You can use the validate access token endpoint to know if you need to get a refresh token or not.