Hello
I have an integration app that is working getting the access token fetching data.
However I am having trouble refreshing the token and I am getting an error:
{“success”:false,“error”:“unauthorized access”,“errorCode”:401,“error_info”:“Please check developers.pipedrive.com”} .
The c# code I am using is as below, can someone see what I am doing wrong?
request = new RestRequest(TOKEN_REQUEST_URL, Method.Post);
string postParams = $"grant_type=refresh_token&refresh_token={integration.RefreshToken}";
string postHeader = "Basic " + Convert.ToBase64String(Encoding.UTF8.GetBytes($"{OauthAppId}:{OauthAppSecret}"));
request.AddParameter("application/x-www-form-urlencoded", postParams, ParameterType.RequestBody);
request.AddHeader("Authorization", postHeader);
response = await client.ExecuteAsync<PipedriveTokenRefreshModel>(request);
Thanks