question

bkiefer1992 avatar image
bkiefer1992 asked

CreateLobby NotAuthorizedByTitle

I'm trying to use the Unity SDK to create a lobby from a client. After calling the CreateLobby API:

PlayFabMultiplayerAPI.CreateLobby(request, OnResult, OnError);

The OnError callback is invoked with a 'NotAuthorizedByTitle' error (message: "Action not authorized by title").

I don't believe we've changed from the default entity global title policy (apart from me messing with it to get the call to work - I've since reset it to the original value).

How can I get the creation of a lobby working from a client?

Title ID: 9EBFC

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Rick Chen avatar image
Rick Chen answered

This issue can be caused by denying the API in your API policy. I understand that you have reset your entity global title policy. But please also check your API Policy and see if this API is denied.

2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

bkiefer1992 avatar image bkiefer1992 commented ·

Thank you for getting back to me Rick. I was unaware the entity global title policy was different from the API policy. I've read the article you've linked and have retrieved our API policy using admin/getpolicy. After updating it with admin/updatepolicy and using "pfrn:api--/Lobby/CreateLobby" as the Resource, I can now successfully create a lobby using lobby/createlobby. I'll update it again with "pfrn:api--/Lobby/*" to allow all lobby APIs.

Thank you very much for your assistance Rick.

0 Likes 0 ·
bkiefer1992 avatar image bkiefer1992 commented ·

Small follow up though, Rick; I don't believe we've changed our API policy, which means by default our API policy didn't allow for lobbies to be created (no entry for lobbies is present in the policy, and I speculate the default behaviour is to deny access). I do believe I tried calling CreateLobby about a week or two ago successfully, and it has since stopped working.

Doesn't really affect me anymore since I can update our policy, but could be of interest to you.

Thanks again!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.