Issue with updating users presence status via API


We’ve implemented a method to update the user’s presence status, and although we receive a 200 response, the client’s status isn’t actually being updated. It’s worth noting that the client is currently logged in. Could you kindly provide suggestions on what steps we could take to address this issue?

	public async Task<bool> SetMemberPresenceStatus(Holiday member, string presenceStatus)
		_settings ??= await _sqlDal.GetZoomSetting();
		await RefreshAccessToken();

			var handler = new HttpClientHandler();

			using (var client = new HttpClient(new RetryHandler(handler)))
				client.BaseAddress = new Uri("");
				client.DefaultRequestHeaders.Authorization =
					new AuthenticationHeaderValue("Bearer", _settings.AccessToken);
				client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));

				var endpoint = $"v2/users/{member.Email}/presence_status={presenceStatus}";
				var response = await client.PutAsync(endpoint, null);

				if (!response.IsSuccessStatusCode)
					AppLog.Instance.Warn($"Code: {response.StatusCode}, Reason: {response.ReasonPhrase}");
					var errorMessage = await response.Content.ReadAsStringAsync();
					return false;

				return true;
		catch (Exception exception)
			AppLog.Instance.WriteError(exception.Message, exception);
			return false;

You have presence_status with a query param value? I do not code in this language, but it seems the PUT update is not happening in the request body. Please see our Postman workspace example:

Yes, it is passed as param to the method.

Hi @amushtaq ,

Please try in the Postman workspace. Change should be made in the request body not applied to query parameter.

The issue is resolved.

Sent securely from Check Point Capsule Workspace

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.