APIv3-typescript-library
APIv3-typescript-library copied to clipboard
Property 'authentications' is protected and only accessible within class 'TransactionalEmailsApi' and its subclasses
trafficstars
I'm trying to run the following code on typescript (found on the official documentation):
import * as SibApiV3Sdk from '@sendinblue/client'
const apiInstance = new SibApiV3Sdk.TransactionalEmailsApi();
const apiKey = apiInstance.authentications['apiKey'];
apiKey.apiKey = process.env.SENDINBLUE_API_KEY!;
But I'm getting the error:
Property 'authentications' is protected and only accessible within class 'TransactionalEmailsApi' and its subclasses.
What am I doing wrong? Is this a bug?
Hi @flaviobvds Can you please try with this
import * as SibApiV3Sdk from "@sendinblue/client";
let apiInstance = new SibApiV3Sdk.TransactionalEmailsApi();
apiInstance.setApiKey(
SibApiV3Sdk.TransactionalEmailsApiApiKeys.apiKey,
process.env.SENDINBLUE_API_KEY!
);
It worked, thanks.
But I still think there's a bug related to the authentications property.