question

company avatar image
company asked

LinkGameCenterAccount error code 400

When calling LinkGameCenterAccount, instead of http 200, i get http 400, along with the playfab error:

LinkGameCenterAccount error code 400 pfaberror AccountAlreadyLinked message User already linked to a different account

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.

company avatar image company commented ·

I see but why is that a http error?

0 Likes 0 ·

1 Answer

·
brendan avatar image
brendan answered

That error indicates that the Game Center account in question is already linked to a different PlayFab account. You can force-update the link to the newer PlayFab account via the ForceLink option, which will remove the link to the previous account.

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

company avatar image company commented ·

I see but why is that a http error?

0 Likes 0 ·
brendan avatar image brendan company commented ·

The 4xx range of HTTP errors are specifically for cases where the client has an error in the request, so that the service can respond with the specifics of what was wrong with the request. In this case, we respond with "Bad Request", and specify that the request isn't valid because the account is already linked to another PlayFab account (and so, cannot be linked to the new one). A 200 would indicate a success, which isn't what happened.

0 Likes 0 ·
company avatar image company brendan commented ·

I think it is a valid request, however it cannot be completed due to logical issues. I checked the definition for http 400: "The HTTP 400 Bad Request response status code indicates that the server could not understand the request due to invalid syntax."

0 Likes 0 ·
Show more comments

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.