From a3666983383288f4e45438106c5103dd6ad0946e Mon Sep 17 00:00:00 2001 From: Andrew Date: Thu, 21 Oct 2021 10:22:32 +1100 Subject: [PATCH] updated authentication header --- source/Zoho.Api/Internals/InternalExtensions.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/Zoho.Api/Internals/InternalExtensions.cs b/source/Zoho.Api/Internals/InternalExtensions.cs index dfafac5..fa64395 100644 --- a/source/Zoho.Api/Internals/InternalExtensions.cs +++ b/source/Zoho.Api/Internals/InternalExtensions.cs @@ -44,7 +44,9 @@ internal static void Configure(this HttpClient httpClient, string apiBaseUrl, st httpClient.BaseAddress = new Uri(apiBaseUrl); - httpClient.DefaultRequestHeaders.Add("authorization", string.Format(CultureInfo.InvariantCulture, "Zoho-authtoken {0}", authToken)); + + + httpClient.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Zoho-oauthtoken", authToken); httpClient.DefaultRequestHeaders.Add("x-com-zoho-subscriptions-organizationid", organizationId); }