Uploaded image for project: 'Mojang Web Services'
  1. Mojang Web Services
  2. WEB-5727

API /profiles/minecraft returns result for specific old username

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • API
    • None
    • 927635

      The API endpoint /profiles/minecraft with a list of usernames erroneously returns results for an old username which is not used by the player anymore. The name is zemstaofficiar. For most other usernames the API does not behave this way and simply does not have results for the old usernames. It is also inconsistent with the behavior of the other API endpoints.

      $ curl -X POST https://api.mojang.com/profiles/minecraft --data '["zoro_mc","zemstaofficiar"]' -H "Content-Type: application/json"
      [{"id":"825b8307bf8348f0ae3cc74722899bb7","name":"zoro_mc"},{"id":"825b8307bf8348f0ae3cc74722899bb7","name":"zemstaofficiar"}]
      $ curl https://sessionserver.mojang.com/session/minecraft/profile/825b8307bf8348f0ae3cc74722899bb7
      {
        "id" : "825b8307bf8348f0ae3cc74722899bb7",
        "name" : "zoro_mc",
        "properties" : [ {
          "name" : "textures",
          "value" : "ewogICJ0aW1lc3RhbXAiIDogMTY1MDgyMjI0NzI5MSwKICAicHJvZmlsZUlkIiA6ICI4MjViODMwN2JmODM0OGYwYWUzY2M3NDcyMjg5OWJiNyIsCiAgInByb2ZpbGVOYW1lIiA6ICJ6b3JvX21jIiwKICAidGV4dHVyZXMiIDogewogICAgIlNLSU4iIDogewogICAgICAidXJsIiA6ICJodHRwOi8vdGV4dHVyZXMubWluZWNyYWZ0Lm5ldC90ZXh0dXJlLzg0MzQyN2Y4YmYzNjBlZjg3NjBiNjM0NDQ3Y2VjZWQ2MDk4MjgyOTZmYWQzYWVkZmMwNTAyODllNTkzNWQwMDkiCiAgICB9CiAgfQp9"
        } ]
      }
      $ curl https://api.mojang.com/user/profiles/825b8307bf8348f0ae3cc74722899bb7/names | jq
        % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                       Dload  Upload   Total   Spent    Left  Speed
      100   225  100   225    0     0    363      0 --:--:-- --:--:-- --:--:--   363
      [
        {
          "name": "BlockNis"
        },
        {
          "name": "BlackWhite_Kian",
          "changedToAt": 1592595582000
        },
        {
          "name": "raze_ttv",
          "changedToAt": 1618853629000
        },
        {
          "name": "zemstaofficiar",
          "changedToAt": 1633885392000
        },
        {
          "name": "zoro_mc",
          "changedToAt": 1640290030395
        }
      ] 
      $ curl https://api.mojang.com/users/profiles/minecraft/zemstaofficiar -i
      HTTP/1.1 204 No Content
      Connection: keep-alive
      Accept-Ranges: bytes
      Cache-Control: no-store
      Date: Sun, 24 Apr 2022 17:59:57 GMT
      Server: Restlet-Framework/2.4.3
      Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
      X-Cache: Miss from cloudfront
      Via: 1.1 7210fed509d8e341021bffe29c62787c.cloudfront.net (CloudFront)
      X-Amz-Cf-Pop: WAW50-C1
      X-Amz-Cf-Id: e83GHowTk0eZaFLJwuEp5FgCvrM-ZDoQc9MzRlAk2sKUjFcCx4aiLQ==
      
      $ curl https://api.mojang.com/users/profiles/minecraft/zoro_mc -i
      HTTP/1.1 200 OK
      Content-Type: application/json
      Content-Length: 58
      Connection: keep-alive
      Accept-Ranges: bytes
      Cache-Control: no-store
      Date: Sun, 24 Apr 2022 18:00:03 GMT
      Server: Restlet-Framework/2.4.3
      Vary: Accept-Charset, Accept-Encoding, Accept-Language, Accept
      X-Cache: Miss from cloudfront
      Via: 1.1 02362f0faae05408640185d927020628.cloudfront.net (CloudFront)
      X-Amz-Cf-Pop: WAW50-C1
      X-Amz-Cf-Id: GknHehEluCamgRtZc0_hAYQVDncuF3qhztDT5ZVteE58GDbvkDRRgw=={"name":"zoro_mc","id":"825b8307bf8348f0ae3cc74722899bb7"}

      It's sth wrong - one API returns that zemstaofficiar is actual nickname (GET profile), second API returns both nicknames to be actual (POST profiles)

            mojangweb [Mojang] Web Team
            k0l0r3k99 k0l0r3k99
            Votes:
            2 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: