question

Visual Engineering AS avatar image
Visual Engineering AS asked

JavaScript Azure Function call PlayFabGroups API Example

Can anyone give us an example of Azure Function that write in JS and call some simple playfab group api? (ex. CreateGroup )

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

Sarah Zhang avatar image Sarah Zhang commented ·

Could you please clarify why you want to call the Entity API CreateGroup on CloudScript using Azure Functions? For clarification, this API can be invoked by the entity of title_player_account too. It means it can be called on the client. If you call this API using the player's entity on the client, the player would become the corresponding creator. Do you mean you want to let the title be the creator of your groups, so you want calling it on the CloudScript using Azure Functions?

0 Likes 0 ·
Visual Engineering AS avatar image Visual Engineering AS Sarah Zhang commented ·

Hi, Sarah. Thank you for replying to the question. Yes, we're trying to let the 'title' be the creator of out groups and get all lists of groups with 'title' ID. We tried to call ListMembership API with 'title' Entity parameters, but got 'Unauthorized' Error. How can we get all lists of groups on the CloudScript using Azure Functions?

0 Likes 0 ·

1 Answer

·
Seth Du avatar image
Seth Du answered

I have let "title" create several groups and call ListMembershipAPI , but cannot reproduce this issue. The list looks fine for me.

Would you confirm the current entity token is for "title" level? Have you got a title entity token in Azure Function?

10 |1200

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

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.