API Call Does Not Work - Please, Help!

Hello, I really need your help after hours of frustrating attempt to make an API call. I try to make the long story short. Let’s start with the API instructions that say :

> To authenticate, use:

curl "https://api-demo.soldocloud.net/oauth/authorize" \
-X POST -H "Content-Type: application/x-www-form-urlencoded" \
-d 'client_id={client_id}&client_secret={client_secret}'


> The above command returns a JSON structured as follows:

{
  "refresh_token": "{refresh_token}",
  "token_type": "bearer",
  "access_token": "{access_token}",
  "expires_in": "7200"
}

I have tested in Postman and it works fine

Then I tried in Bubble API Connector, like this (and a hundred other ways …)

There is no way to make it work :sob: Please, If anybody can help I can share the test keys in PM.

Thank you in advance.

you should not use a comma (and space) to separate value in parameters but &
like
client_id=yourid&client_secret=yoursecret

But I really believe that you should use the authentication part in your API instead of doing it manually. This way. Bubble will automatically refresh token when needed

1 Like

@Jici Now it works :slight_smile: I have tried so many different option that I forgot the simplest. Thank you.

Since you mentioned to use the authentication part in my API (and that will refresh the token when needed), can you elaborate a little more ? Or maybe you are available as freelancer to help me with this project. Please let me know. And thank you again