Reputation: 5633
What's the best way to check if a string is a valid Xbox Live username? I believe there is an API in relation to this, but I'm not sure which API approach is the best way to accomplish this.
Upvotes: 1
Views: 2243
Reputation: 6864
I believe this API is the best to use for checking if the Gamertag is valid or not.
Here is a valid Gamertag: https://xboxapi.com/profile/VNM+Jar that returns "Success":true
Here is an invalid Gamertag: https://xboxapi.com/profile/196jjdfd74nu9za that returns "Success":false
You could then do anything you wish with these values...
Upvotes: 1