You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* @param {Environment} [opts.environment=production] - Specifies the environment URL to use for the API.
105
131
* @param {string} [opts.baseURL=process.env['FLOWGLAD_BASE_URL'] ?? https://app.flowglad.com/api/v1] - Override the default base URL for the API.
106
132
* @param {number} [opts.timeout=1 minute] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out.
@@ -112,12 +138,12 @@ export class Flowglad extends Core.APIClient {
112
138
*/
113
139
constructor({
114
140
baseURL =Core.readEnv('FLOWGLAD_BASE_URL'),
115
-
apiKey =Core.readEnv('FLOWGLAD_API_KEY'),
141
+
apiKey =Core.readEnv('AUTHORIZATION_KEY'),
116
142
...opts
117
143
}: ClientOptions={}){
118
144
if(apiKey===undefined){
119
145
thrownewErrors.FlowgladError(
120
-
"The FLOWGLAD_API_KEY environment variable is missing or empty; either provide it, or instantiate the Flowglad client with an apiKey option, like new Flowglad({ apiKey: 'My API Key' }).",
146
+
"The AUTHORIZATION_KEY environment variable is missing or empty; either provide it, or instantiate the Flowglad client with an apiKey option, like new Flowglad({ apiKey: 'My API Key' }).",
121
147
);
122
148
}
123
149
@@ -147,6 +173,9 @@ export class Flowglad extends Core.APIClient {
0 commit comments