- PlayFab で CreateDraftItem の API 実行時に NotAuthorized エラーが発生
- 原因は CreateDraftItemRequest クラスの Type が 所定の値になっていなかったこと
- bundle, catalogItem, currency, store, ugc, subscription. のみサポート
以下、最終的に動いたコード
var createDraftItemRequest = new PlayFab.EconomyModels.CreateDraftItemRequest
{
AuthenticationContext = economyApiInstance.authenticationContext,
Item = new PlayFab.EconomyModels.CatalogItem
{
CreatorEntity = entityKey,
Type = "catalogItem",
ContentType = monsterId,
Title = new Dictionary<string, string>(){ {"NEUTRAL", monsterId}},
StartDate = DateTime.Now,
Tags = new List<string> { "Monster" }
},
Publish = true,
CustomTags = new Dictionary<string, string>
{
{ "server", "sample" }
}
};