Hello!
I have ran into issue I had no luck with. I am working on transitioning to Events V2 (Entity API) in the scope of our project. So far everything being good until I have come to calling WriteEvents / WriteTelementry events with EventType = 'master_player_account'
Let's assume I use following code (simplified to one I have rn):
var playerEvent = .... //Here I simply receive some internal playerEvent object that represent data about player activity I want push to PlayStream Events
string eventNamespace = "custom";
string eventName = GetEventName(playerEvent); //Get eventname
DateTimeOffset eventTime = DateTimeOffset.UtcNow;
EventContents eventContents = new EventContents()
{
Name = eventName,
OriginalTimestamp = eventTime.DateTime,
Entity = new PlayFab.EventsModels.EntityKey()
{
Id = playerEvent.PlayerId,
Type = "master_player_account"
},
PayloadJSON = playStreamEvent.Details.ToJson(),
CustomTags = playStreamEvent.CustomTags,
EventNamespace = eventNamespace
};
//And then I simply call WriteEventsAsync with that model
await _playfabWrapperService.WriteEventsAsync(new WriteEventsRequest()
{
Events = new List<EventContents>(){
eventContents
}
});
And I unexpectedly received following error:
[2024-02-12T16:49:03.971Z] Error calling /Event/WriteEvents. EventEntityNotAllowed: The requesting entity is not authorized to write events with entity master_player_account!2FF47BF2266DC06E
[2024-02-12T16:49:03.983Z] Failed to publish events
[2024-02-12T16:49:03.984Z] Result: Failed to publish events
Exception: G01.AzurePlayfabCommon.Models.PlayFabCallException: The requesting entity is not authorized to write events with entity master_player_account!2FF47BF2266DC06E.
8b012bcc1a224207aac85601be9c616d
Which I haven't seen mentioned anywhere in documentation.
Could you please explain why we are getting this error? Is there some configuration error on our side?
P.S. So far everything works well for me for EntityType = 'character'.