Closed vrxj81 closed 2 months ago
Thanks for reaching out, Johan.
The current version of the client performs a falsy check on apiKey
and accessToken
. It will throw the "missing parameter" error for any falsy value, including an empty string. Could you check the value of process.env['MOLLIE_API_KEY']
(using console.log
, for instance)?
I'm closing this issue, as I suspect you accidentally passing an empty string to apiKey
is what is causing your issue.
If I'm wrong, please comment and I'll reopen.
Hope your application turns out nicely!
I'm trying to us the Mollie NodeJS API in a NestJS application, but when I use the createMollieClient function, I get the error TypeError: Missing parameter "apiKey" or "accessToken". while I'm providing the apiKey options. See code below:
I also tried the createMollieClient available like so:
import { createMollieClient, MollieClient, MollieOptions } from '@mollie/api-client';
But same issue.