Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • Bugs /
avatar image
Question by cosmosark · Oct 15, 2018 at 06:05 AM · unity3dShared Group Data

Cannot add member to Shared Group via Server API in Cloud Script

(AddSharedGroupMembers) I cannot add a member to a Shared Group via the server API I'm trying on a cloud script. Error:

"Logs": [ { "Level": "Error", "Message": "PlayFab API request error", "Data": { "api": "/ Server / AddSharedGroupMembers", "request": { "SharedGroupId": "ExistingRooms", "PlayFabIds": [ "E813B7BAD690BBE6" ] }, "result": null,

"apiError": { "code": 400, "status":

"BadRequest", "error":

"InvalidSharedGroupId",

"errorCode": 1088, "errorMessage":

"InvalidSharedGroupId",

"errorHash": null,

"errorDetails": null }

} }, { "Level": "Info", "Message": "Error: {\" cloudScriptErrorCode \ ": \" CloudScriptAPIRequestError \ ": \" stack \ ": \" Error \\ n at Object.server_request (Script Document: 176: 24) \\ n at Object. server.AddSharedGroupMembers (Script Document: 695: 78) \\ n at handlers.saveSharedDataMembers (DC66-main.js: 306: 14) \\ n at Object.invokeFunction (Script Document: 112: 33) \ ", \" apiErrorInfo \ "{\" API \ "\" / Server / addsharedgroupmembers \ ", \" request \ "{\" sharedgroupıd \ "\" existingrooms \ ", \" playfabıds \ "[\" E813B7BAD690BBE6 \ " ]}, \ "result \" nULL \ "apierr is \" {\ "code \" 400, \ "status \" \ "BadRequest \", \ "error \" \ "ınvalidsharedgroupıd \", \ "errorcode \": 1088, \ "ErrorMessage \" \ "ınvalidsharedgroupıd \", \ "errorhash \" nULL \ "errordetails \": null}}} " "Data": null } ]

What should I do? Thank you

Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Andy · Oct 15, 2018 at 10:02 PM

The error you're getting back, InvalidSharedGroupId, means that the data you're provding in the SharedGroupId parameter of the request is bad. If you could share the title id and the value you're passing in, I can help you validate.

Comment

People who like this

0 Show 5 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image cosmosark · Oct 16, 2018 at 12:35 PM 0
Share

Title ID: DC66
SharedGroupId: ClanMemberList

in Cloud Script:

handlers.saveSharedDataMembers = function (args) { try{

server.AddSharedGroupMembers({

SharedGroupId : args.SGDType, PlayFabIds : [args.SPI] });

server.WriteTitleEvent({ EventName : "saveSharedDataMembers" });

return { ResultCode : 0, Message: 'Success' };

}catch(e){ var msg = "Error saveSharedDataMembers: " + JSON.stringify(e); log.info(msg); } };

avatar image Andy ♦♦ cosmosark · Oct 17, 2018 at 01:33 AM 0
Share

Did you ever call CreateSharedGroup for that group or create in the game manager? I'm not able to find it for your title, which explains the error.

avatar image cosmosark Andy ♦♦ · Oct 17, 2018 at 08:11 AM 0
Share
<br><div></div> 1321/5000 Şu dilden çevir: İngilizce First I'm triggering this function from Unity:PlayFabClientAPI.ExecuteCloudScript (new ExecuteCloudScriptRequest (){FunctionName = "createSharedDataMembers",FunctionParameter = new{SGDType = _SharedGroupId},GeneratePlayStreamEvent = true}, OnCreateSuccess, OnErrorShared);
Later in Cloud Script:handlers.createSharedDataMembers = function (args) {try {server.createsharedgroup ({SharedGroupId: args.SGDType});server.writetitleevent ({EventName: "createSharedDataMembers"});return {ResultCode: 0, Message: 'Success'};} Catch (e) {var msg = "Error createSharedDataMembers:" + JSON.stringify (e); log.info (msg);}};
Show more comments

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    unity3d 2017 UriFormatException: Invalid URI: The hostname could not be parsed. (.playfabapi.com),UriFormatException: Invalid URI: The hostname could not be parsed. (.playfabapi.com) 2 Answers

    Client Matchmake HTTP error in UnitySDK-2.48.180809 0 Answers

    PlayFab EditorExtensions: Caught an error:Invalid JSON string 4 Answers

    PlayFab Multiplayer server stuck on 'Pending heartbeat' state. 1 Answer

    GameManager fails to display shared group data 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges