Invalid OAuth Client

  • 10 January 2024
  • 3 replies



I am trying to setup OAuth for my plugin but i am receiving this when sending request to

{ error: 'invalid_client', error_description: 'Invalid OAuth Client' }


What is the meaning of this response, please?



Best answer by justin 11 January 2024, 16:56

View original

3 replies

I recorded a loom video that you can watch here



Also here is the code sending the request

export const getFrontAccessToken = async (code: string, slug: string) => {
const clientId = process.env.NEXT_PUBLIC_FRONT_CLIENT_ID;
const clientSecret = process.env.NEXT_PUBLIC_FRONT_CLIENT_SECRET;
const encodedAuth = btoa(`${clientId}:${clientSecret}`);
console.log('getFrontAT ', clientId, clientSecret, encodedAuth);

const response = await fetch('', {
method: 'POST',
body: JSON.stringify({
// redirect_uri: `http://localhost:3000/settings/${slug}/front`,
grant_type: 'authorization_code',
headers: {
'Content-Type': 'application/json',
accept: 'application/json',
Authorization: `Basic ${encodedAuth}`,
console.log(await response.json());


Userlevel 3
Badge +6


Thanks for reach out regarding this. Based on your recording, it appears that you are being redirected to http, rather than https…, as specified by you Oauth client configuration. 

After making this change, I would also suggest ensuring that your secret is correct for this particular client. The error we see on our end indicates that there was a failure to exchange the authorization code that can be caused by this. 

If you continue to encounter errors after making these changes and confirming the details of the configuration, I would recommend reach out separately to our support team as further investigation would require attention into more private details of your Oauth client that would not be suitable for a public forum such as this.