OAuth2 client_credential authentication

I really need this for some software called XAP to interface with.

They have an API here
Swagger UI (kidsxap.com.au)

They have given me a client key and secret this is how they show it should be set up in postman.

Any help would be greatly appreciated.

Hey @KAL, I assume you’ll be using the HTTP Request node for this? You’d need to switch the Authentication method to OAuth2 first:


On the Credential dropdown you’ll then be able to use existing OAuth credentials or create new ones like so:

Hi @MutedJam , that part I understand. Its that it doesn’t use a redirect URL etc like the ones in the OAuth2 box, it uses.
OAuth Grant Types

I found this, but it uses twitter as an example, which i can’t seem to relate to what Im doing.
Add client_credentials grant type feature for oauth2 - Feature Requests - n8n

that article points to this
Using Client Credential OAuth in n8n | by Tuckner | Feb, 2022 | Medium

but, im still lost. Im’ sorry.

That’s a fair point and n8n should definitely cover this. What the example workflow from your article does is manually running the requests required for the client_credentials OAuth2 flow.

If you copy the JSON from the article straight into your n8n canvas you should see the actual nodes:

The article suggests entering your client ID as the basic auth username and your client secret as the basic auth password on the first node (and of course replacing the URL because you don’t want to send these to Twitter). Could you give that a go?

Hi @MutedJam i managed to get it to work, i had to do no auth, but put the client_id and client_secret in the body and i got the access token.


1 Like

Glad to hear you sorted this out :slight_smile:

Thanks so much for confirming!