Unauthorized access on vercel

Hi,

I’m having an issue when using the pipedrive api :
I’m developping on a nextjs application. I tried using the api with https://pipedrivedomainurl/api/v1/persons?api_token=token_api_from_parameters from a http request to create a persons or by using the nodejs client.
when I’m developping on localhost there are no issue. But once I’m deploying my application on vercel I get an unauthorized access :

{
      success: false,
      error: 'unauthorized access',
      errorCode: 401,
      error_info: 'Please check developers.pipedrive.com'
 },.
await fetch(https://`pipedrivedomainurl`/api/v1/persons?api_token=`token_api_from_parameters`,
     {
       headers: {
         "Content-Type": "application/json",
       },
       method: 'POST',
       body: JSON.stringify({
         name: name,
         email: mail,
        phone: phoneNumber,
       })
    // });

Thanks for the help.

Welcome to the community @IT_user. I see that you are using fetch() - can I assume that you are making this call from a Node.js app (v17.5 and above)?

If it’s happening via the frontend, it is bound to fail unless there’s a wrapper/proxy API in between. I am guessing that it’s not the case.

Can you share more details regarding this?