question

Nicolas De Zubiria Cano avatar image
Nicolas De Zubiria Cano asked

Missing or invalid X-Authentication HTTP header when Updating other user UserData

Hello, I've been working with Playfab and also learning it for some time in a sort of social app. The thing is that we need to create a functionality where the user can follow another user. When the current user (the one that is currently logged in the device) follows another user we are adding that user into the current user friend list, then we udate some UserData inside Playfab, so far so good, the problem comes when i want to update the other user data. When a user is followed it's number of followers, obviously like instagram, gets increased and the when we need to update the data that holds the number of followers i get the "Missing or invalid X-Authentication HTTP header"error. My best guess is that I'm trying to update a UserData different from the one that is currently logged in the device. Is there a way i can work this out? Any suggestion is very appreciated.

Player Dataunity3d
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

·
Nicolas De Zubiria Cano avatar image
Nicolas De Zubiria Cano answered

Never mind I found the way to do it. Using PlayFabServerAPI.UpdateUserData instead of the client api.

1 comment
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 ·

If you want to implement the feature that you said. Maybe you can check the doc to learn about Friend. You can find some client APIs about it. If you want to call the server API in the client. We suggest you to use server API via the CloudScript or in the custom server for security.

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.