Domanda

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.

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top