SubmitReportAsync
Methods
public Task<ReportId> SubmitReportAsync(PlayerAccountId target, ReportCategory category, string notes = null, CancellationToken cancellationToken = default)
Submits a report against target player account for a policy violation.
Parameters
| Type | Name | Description |
|---|---|---|
| PlayerAccountId | target | The id of the player account being reported. |
| ReportCategory | category | Category of the reported behavior. |
| string | notes | Optional player-supplied narrative. coherence Cloud currently accepts up to 500 Unicode code points, and fails longer notes with Coherence.Runtime.ErrorCode.ReportsInvalidNotes. |
| CancellationToken | cancellationToken | Optional cancellation token. |
Returns
| Type | Description |
|---|---|
| Task<ReportId> | The newly-generated ReportId on successful durable commit. |
Remarks
coherence Cloud limits how many reports a player can submit, currently 20 in any 24 hours, and how often they can report the same player account, currently once an hour. Going over those limits fails the request with Coherence.Runtime.ErrorCode.ReportsRateLimited or Coherence.Runtime.ErrorCode.ReportsTargetCooldown respectively.
Exceptions
| Type | Condition |
|---|---|
| RequestException | The backend rejected the report — see Coherence.Runtime.RequestException.ErrorCode for the specific cause (rate limit, invalid input, target not found, etc.). |