What's the list of legal characters in a username? (looks like underscore is illegal?)
Also, why, if I try to create a PlayFab account with a username with an illegal character, do I get "invalid params", not "invalid username"?
What's the list of legal characters in a username? (looks like underscore is illegal?)
Also, why, if I try to create a PlayFab account with a username with an illegal character, do I get "invalid params", not "invalid username"?
Currently, it's required to be alphanumeric (A to Z - upper or lower - and 0-9). The issue with it returning InvalidParams instead of InvalidUsername is because our system does early-out checks on the input parameters to all calls, with the alphanumeric check for usernames being at that stage. Since changing that now would be a breaking change for anyone using that error, we can't really change it for the current API calls, but we can consider this as a change for the future. However, you do get a consistently reliable errorDetails that tells you that the username has invalid characters:
{ "code": 400, "status": "BadRequest", "error": "InvalidParams", "errorCode": 1000, "errorMessage": "Invalid input parameters", "errorDetails": { "Username": [ "Username contains invalid characters." ] } }
Any chance you will open up this character set for non-US users?
3 People are following this question.