I’m using an API for my app : API reference · Smartcar docs
I tried to achieve the https://auth.smartcar.com/oauth/token call which need base64 "Authorization token (Authorization: Basic base64({client_id}:{client_secret})) " but I cannot achieve it I always got the same issue :
“Raw response for the API
Status code 400
{“error”:“invalid_request”,“error_description”:“Invalid code: undefined.”}”
Normally, you should use Bubble oAuth2 user-agent authentication
. But because this API doesn’t return email when calling the user endpoint, you need to process manually.
Normally this is apikey:apisecret
The error you get seem to be related to the code returned by authorization url and used in the token endpoint. Maybenyou sre not fast enough? The code doesn’t length a lot of time. Share screenshot of API connector
I don’t think is link to the timing because on the API documentation they said :
“An authorization code that will be used to obtain an access token in the following step. The authorization code expires after 10 minutes.”
I think may be due to the way I encoded the ids. But I just did “client_id:secret_id” and paste it in base64 encoder so I don’t see where the mistake is.
I tried both way Authorization - Basic base64encoestring and Basic - base64encoestring
Still same result. I must miss something. I will keep searching.
It’s hard to validate on our side if you encoded correctly the base64 clientid:clientsecret
You can also try to put everything in the url instead ?grant_type=…
The error code you get seem more related to the code
Or do you have different error message?