When a call or live interactive streaming ends, you can gather feedback on the quality of experience to improve your product by asking your users to rate the call or live interactive streaming.

The Agora SDK provides methods for you to collect your users' ratings and comments on the calls.

After the rating function is implemented, you can see your users' ratings in Agora Analytics, as shown in the figure below:


Before proceeding, ensure that you implement a basic video call or live interactive streaming in your project. See Start a Call/Start Live Interactive Video Streaming for details.

To rate a call:

  1. When you are in the channel, call the getCallId method to get current call ID.
  2. After leaving the channel, call the rate method to rate the call.

Sample code

// C++
// Get current call ID.
agora::util::AString callId;
CString strCallId

#ifdef UNICODE
 ::MultiByteToWideChar(CP_UTF8, 0, callId->c_str(), -1, strCallId.GetBuffer(128), 128);
 strCallId= callId->c_str();

#ifdef UNICODE

 ::WideCharToMultiByte(CP_UTF8, 0, strCallId, -1, wdCallId, MAX_PATH, NULL, NULL);
// Rate 5 and give description.
 lpAgoraEngine->rate(wdCallId, 5, "This is an awesome call!");
// Rate 1 and give description.
 lpAgoraEngine->rate(strCallId, 1, "I don't like this call!");

API reference