question

liamsc20211@outlook.com avatar image
liamsc20211@outlook.com asked

How do I check if a certain person is in a group?

I am trying to make a vent system so if someone was in a group they could open the vent, but I cant figure out how to use the IsMember thing. Can anybody help me?

apis
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

·
Gosen Gao avatar image
Gosen Gao answered

Because to know if a player is a member of a group needs some permission to read the group profiles, you need a title level entity token to call Groups - Is Member - REST API (PlayFab Groups) | Microsoft Learn. You can get a title level entity token with Authentication - Get Entity Token - REST API (PlayFab Authentication) | Microsoft Learn. You can also call IsMember API with Azure Function.

3 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.

liamsc20211@outlook.com avatar image liamsc20211@outlook.com commented ·

I do have the entity token but whenever I go back into unity it says: 'PlayFabClientAPI' does not contain a definition for 'member'. My code is:


string id = result.EntityToken.Entity.Id;
string gid = "FC625A39478873C8";
PlayFabClientAPI.IsMember(id, gid);

0 Likes 0 ·
Gosen Gao avatar image Gosen Gao liamsc20211@outlook.com commented ·

This API is a group API, you should use class PlayFabGroupsAPI. BTW, since to get the title level entity token needs the Secret Key, we don't recommend doing it on the client side. You can call IsMember API with Azure Function.

0 Likes 0 ·
liamsc20211@outlook.com avatar image liamsc20211@outlook.com Gosen Gao commented ·

Thanks! I will try this

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.