I try to use the HTTP module with oauth2 authentication. I want to use grant type Client Credentials but i can only choose ‘Authorization Code’ or ‘Implicit’ for the oauth2 connection. How can i get the other methode into the HTTP.
I’d try sending that same payload to webhook.site instead of the target API to see what actually gets sent. Just replace the URL with your custom webhook.site URL (they make one for every user). I find that kind of introspection can help a lot in diagnosing.
Depends on the details of your API! If your API uses client credentials to get an access token, then yes, you need to make that call first before you call the useful API endpoint with the access token you just redeemed in the previous step.
This server-server flow (e.g. client credentials or refresh token) is tricky but possible - it’s all just sequenced post requests. The implicit/authorization code flow is the one that requires user intervention - I suspect that’s why there are special selectors for it.
Hi @alex.newpath, I am not sure if that’s exactly the same because it wasn’t oAuth2, so please just ignore it if I understood it completely wrong
When I authenticate to some programs using client credentials, it’s quite common that the token/cookies expire. I feel like everyone handles refreshing a little different but in one example it’s a POST request to the “/me” endpoint containing the token of the first Authentication-request. I try to understand how they refresh it by looking at the developer console for a certain amount of time
Once I understand, I create a small custom app.
0. Setting up the connection → receiving a (semi-) permanent refresh-token
Basically chaining two requests:
a POST request to the “/me” endpoint to receive a non-expired token
the actual request of “get user” or whatever you want to do
As I said, I am not really sure if that’s the challenge here. But this way I don’t need to manually refresh any tokens