Hi, I am using an API that uses OAuth 2.0 and x-www-form-urlencoded. The API gives me a client_id (public), a client_secret (private), and grant_type called client_credentials to access the API. I first have to perform a post request that generates a token. Once I have the token I use it in a header
Key: Authorization Value: Bearer {{token}}
I have tried variations of all the OAuth 2.0 options provided by bubble.
Here is my current attempt:
I think the right way to do it is a post call to get the token → use the call in a workflow and get the token → use ‘result of step x’ in another workflow to do other calls.
This works easily in postman so I know its possible. I have done normal auth key JSON calls before but the ‘application/x-www-form-urlencoded’ is really throwing me off. Any ideas would be greatly appreciated.
I have looked at a few of the application/x-www-form-urlencoded threads but their solutions have not worked for me.
Thank you for the suggestion @doug.burden and @johnny , I tried both of them but no luck so far.
I have tried to copy the postman(which works) into bubble api connector(doesn’t work)
Im going to put screenshots of the postman vs the bubble api connector please let me know if you have any ideas!
Client credentials should be used with custom oauth2 token. So your first screenshot is almost correct. But in most case, you will have a basic authorization header and you shouldnt have the header grant typre, that is in the url parameters.