From a6a642a78948844694d04263b25eeafc0cabf9e7 Mon Sep 17 00:00:00 2001 From: Steven Hicks Date: Wed, 12 Jun 2024 17:20:39 -0500 Subject: [PATCH] fix: specify the correct audience when getting an Optimize auth token (#185) Optimize API calls were not authorized with the correct token audience, leading to a 401 in every case. This is now fixed to use the correct token audience. --- src/optimize/lib/OptimizeApiClient.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/optimize/lib/OptimizeApiClient.ts b/src/optimize/lib/OptimizeApiClient.ts index 6d0d8e4f..c1cb01fc 100644 --- a/src/optimize/lib/OptimizeApiClient.ts +++ b/src/optimize/lib/OptimizeApiClient.ts @@ -95,7 +95,7 @@ export class OptimizeApiClient { } private async getHeaders(auth = true) { - const token = await this.oAuthProvider.getToken('OPERATE') + const token = await this.oAuthProvider.getToken('OPTIMIZE') const authHeader: { authorization: string } | Record = auth ? {