Error 45003, Wrong client ID given, invalid_client

I’m submitting a request to get a grant, but it’s not working. I have an account created after migrating from version V2 to version V3. If I try this with a test account, everything works.


        const response = await fetch('https://api.us.nylas.com/v3/connect/token', {
          method: 'POST',
          headers: {
            'Content-Type': 'application/json',
            Authorization: `Basic ${config.NylasApiKey}`,
          },
          body: JSON.stringify({
            client_id: `${config.NylasIdClient}`,
            client_secret: `${config.NylasApiKey}`,
            grant_type: 'authorization_code',
            code: nylasCode,
            redirect_uri: `http://localhost:8080/choosecalendar`,
          }),
        });

        const dataConnectToken = await response.json();
        console.log(dataConnectToken, 'dataConnectToken dataConnectToken')

And I’m getting this error. What could be the reason? I don’t have an account, and there are no matches with grantId either. Please help me resolve this.

{
    "error": "invalid_client",
    "error_code": 45003,
    "error_description": "Wrong client ID given",
    "error_uri": "https://developer.nylas.com/docs/v3/api-references/event-codes",
    "request_id": "5215060870-3db30d77-2fcb-4d85-a65d-d42a1ea6cf8c"
}, 'dataConnectToken dataConnectToken'

@Kateryna - Thanks for posting, I just saw your other message, let me know if this is still an issue.