Trouble with OAuth on chrome extension

hello i am trying to integrate Monday to my chrome extension, I am receiving the auth code and when i request token in exchange for the auth code i am receiving code 500
can someone point me to the right direction

some of the code I am using

let code = url.substring(url.indexOf(“code=”) + “code=”.length);
code = code.substring(0, code.indexOf(“&”));

    const requestTokenUrl = new URL("https://auth.monday.com/oauth2/token");
    const params = { code, client_id:MONDAY_CLIENT_ID ,client_secret:CLIENT_SECRET};

    requestTokenUrl.search = new URLSearchParams(params).toString();
    axios.get(requestTokenUrl.toString()).then((res)=>{
      console.log(res.data)
  });

Hey there, @denis_dom :wave:

Welcome to our developers community! I hope you enjoy your stay.

Just to make sure we’re on the same page here, could you clarify what your app is looking to accomplish in this case? I’d be glad to learn a bit more about the Chrome extension you aer looking to develop so that we understand the behavior in context.

If you are using the Apps Framework, you will only be able to use the OAuth flow to get an API access token after a user installs your app within their account. Perhaps that could be the issue here?

I’d also love to understand where exactly within the OAuth flow you are receiving this error, as this would help us put the behavior into context as well.

I’m looking forward to hearing from you soon! :slight_smile:

-Alex

Hey @denis_dom!

Since we haven’t heard back from you in a while, we are going to close this topic.

In case you are still having problems with this, you can either reopen this topic or contact us directly at appsupport@monday.com and we will be more than happy to help you! :smile:

Cheers,

-Matias