View and take action on reports
Introduction
AccelByte Gaming Services (AGS) chat reporting and moderation feature allows you to view player reports and take appropriate action.
The chat reporting and moderation settings are available in game namespaces in the AGS Admin Portal. On the sidebar, go to Chat > Reporting and Moderation to access the menu.
Prerequisites
Game admins must have the followings permissions:
Permissions | Action | Usage |
---|---|---|
ADMIN:NAMESPACE:{namespace}:CHAT:TOPIC | READ , UPDATE , DELETE | To view and delete reported chats and ban users |
View and take action on reports
On the Admin Portal sidebar, go to Social > Reporting and Moderation > Report List. The Report List page appears. On this page, reports are categorized by UGC, Player, and Chat.
Find the report that you want to review and click its View option. The details page of the report appears. On this page, you can review the reported chat and take action.
To ban a user, click Ban User. The Chat Ban form appears.
Set the details and terms of the ban:
- Ban Type: Select the type of ban the user will receive.
- Ban expiration: Set the duration of the ban.
- Reason : Select a reason for the ban.
- Comment: (Optional) Add a comment.
- Notify user via email: Tick this box if you want to email the user about their ban.
Click Ban. The user's ban will immediately take effect based on the details and terms you set.
SDK sample code
- Unreal Engine
- Unity
- Go Extend SDK
- Python Extend SDK
- Java Extend SDK
- C# Extend SDK
FApiClientPtr UserApiClient = FMultiRegistry::GetApiClient();
FAccelByteModelsReportingSubmitDataChat ReportData;
ReportData.Comment = TEXT("Report comment"); // Details or comments about the report
ReportData.Reason = ReportingReason; // Get value from GetReason, or use a custom string
ReportData.ChatId = ChatId; // Chat ID we want to report
ReportData.UserId = UserId; // User ID we want to report
ReportData.ChatCreatedAt = chat_createdAt; // The chat createdAt field
ReportData.ChatTopicId = topicId; // The chat's topic ID
FAccelByteModelsReportingSubmitResponse ReportResponse;
bool bReportSuccess {false};
THandler<FAccelByteModelsReportingSubmitResponse> OnReportSuccess =
THandler<FAccelByteModelsReportingSubmitResponse>::CreateLambda(
[&](const FAccelByteModelsReportingSubmitResponse& Result)
{
// Do something when report success
});
FErrorHandler ReportingOnError = FErrorHandler::CreateLambda([](int32 Code, const FString& Message)
{
// Do something when error submitting report
});
UserApiClient->Reporting.SubmitChatReport(ReportData, OnReportSuccess, ReportingOnError);
ApiClient userApiClient = MultiRegistry.GetApiClient();
ReportingSubmitDataChat report = new ReportingSubmitDataChat()
{
category = ReportingCategory.CHAT,
comment = "inappropriate chat", // Comments or details about the report
additionalInfo = new ReportingAdditionalInfoChat()
{
topicId = topicId, // Topic ID the chat is associated with
chatCreatedAt = createdAt // Chat field's createdAt
},
objectId = chatId, // Chat ID we want to report
objectType = "chat",
reason = reasonTitle, // Get value from GetReason's title field
userId = UserId // User we want to report
};
userApiClient.GetReporting().SubmitChatReport(report, result =>
{
if (result.IsError)
{
// Do something when submit report fails
}
else
{
// Do something when submit report succeeds
}
})
publicReportsService := &reporting.PublicReportsService{
Client: factory.NewReportingClient(&repository.ConfigRepositoryImpl{}),
TokenRepository: &repository.TokenRepositoryImpl{},
}
category := reportingclientmodels.RestapiSubmitReportRequestCategoryCHAT
reason := "myreason"
chatId := "mychatid"
userId := "myuserid"
body := reportingclientmodels.RestapiSubmitReportRequest {
Category: &category,
Comment: "mycomment",
Reason: &reason,
ObjectID: chatId,
ObjectType: "chat",
UserID: &userId,
AdditionalInfo: map[string]interface{}{
"topicId": "mytopicid",
"chatCreatedAt": "mychatCreatedAt",
},
}
namespace := "mygame"
input := &public_reports.SubmitReportParams{
Body: &body,
Namespace: namespace,
}
result, err := publicReportsService.SubmitReportShort(input)
import accelbyte_py_sdk.api.reporting as reporting_service
import accelbyte_py_sdk.api.reporting.models as reporting_models
result, error = reporting_service.submit_report(
body=reporting_models.RestapiSubmitReportRequest()
.with_category(reporting_models.RestapiSubmitReportRequestCategoryEnum.CHAT)
.with_comment("inappropriate chat")
.with_additional_info({"topicId": topic_id, "chatCreatedAt": created_at})
.with_object_id(chat_id)
.with_object_type("chat")
.with_reason(reason_title)
.with_user_id(user_id),
)
if error:
exit(error)
PublicReports publicReportsWrapper = new PublicReports(sdk);
String reportComment = "<details or comments about the report>";
String reportReason = "<why this chat is reported>";
String chatId = "<chat id we want to report>";
String userId = "<user id we want to report>";
String topicId = "<the chat's topic id>";
String chatCreatedAt = "<the chat createdAt field>";
RestapiSubmitReportResponse response;
try {
RestapiSubmitReportRequest reqBody = RestapiSubmitReportRequest.builder()
.categoryFromEnum(RestapiSubmitReportRequest.Category.CHAT)
.comment(reportComment)
.reason(reportReason)
.objectId(chatId)
.objectType("chat")
.userId(userId)
.additionalInfo(Map.of("topicId", topicId,
"chatCreatedAt", chatCreatedAt))
.build();
response = publicReportsWrapper.submitReport(SubmitReport.builder()
.namespace("<namespace>")
.body(reqBody)
.build());
} catch (Exception e) {
// Do something when failed
return;
}
if (response == null) {
// Null response from server
} else {
//do something when report success
}
string reportComment = "<details or comments about the report>";
string reportReason = "<why this chat is reported>";
string chatId = "<chat id we want to report>";
string userId = "<user id we want to report>";
string topicId = "<the chat's topic id>";
string chatCreatedAt = "<the chat createdAt field>";
RestapiSubmitReportRequest chatReport = new RestapiSubmitReportRequest()
{
Category = RestapiSubmitReportRequestCategory.CHAT,
Comment = reportComment,
Reason = reportReason,
ObjectId = chatId,
ObjectType = "chat",
UserId = userId,
AdditionalInfo = new Dictionary<string, object>()
{
{ "topicId", topicId },
{ "chatCreatedAt", chatCreatedAt }
}
};
var reportResponse = sdk.Reporting.PublicReports.SubmitReportOp
.Execute(chatReport, sdk.Namespace);
Assert.IsNotNull(reportResponse);
if (reportResponse != null)
{
//do something when report success
}