5 months ago
Received HTML instead of JSON. Status: 403. Content: <html> <head><title>403 Forbidden</title></head> <body> <center><h1>403 Forbidden</h1></center> <hr><center>Microsoft-Azure-Application-Gateway/v2</center> </body> </html>
Method:
async def get_uuid_from_username(self, username: str) -> Optional[str]:
"""Get UUID from Minecraft username"""
try:
url = f"https://api.mojang.com/users/profiles/minecraft/{username}"
async with self.session.get(url) as response:
if response.status == 200:
data = await response.json()
return data.get('id')
except Exception as e:
logger.error(f"Failed to fetch UUID: {str(e)}")
return None
This code hasn't been changed in over 2 years, has been functioning perfectly fine until today. All my requests are returning 403's. This works perfectly fine locally, but when deployed on Railway I am running into issues.
For context, this resolution from Minecraft Name -> UUID is a critical component of all my applications, and any application that works with the Mojang/Minecraft API and I suspect I am not the only one affected? Any guidance here, contacting Microsoft is effectively talking to a brick wall..
1 Replies
5 months ago
This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.
Status changed to Open brody • 5 months ago
5 months ago
Hello,
I'm sorry but we aren't able to provide any assistance with this issue.
Mojang sending your application a 403 is not something we have any control over unfortunately, you would need to get in contact with their support.
Best,
Brody