Skip to content

There's a limit on user name length? #516

@ianchesal

Description

@ianchesal

Part bug, part question I guess. I noticed this when playing around with the HTTP API. The following returns NOT_FOUND (more or less as expected):

> curl 'https://keybase.io/_/api/1.0/user/lookup.json?username=abcdefghijklmnop'
{
  "status": {
    "code": 205,
    "desc": "user not found abcdefghijklmnop",
    "name": "NOT_FOUND"
  },
  "guest_id": "23a720cc7d9a69257ceb8ef3a504dd08",
  "csrf_token": "lgHZIDIzYTcyMGNjN2Q5YTY5MjU3Y2ViOGVmM2E1MDRkZDA4zlNAmQTOAAFRgMDEIGL0fyMu6s7B5ccsuuxSG14EFptgTrVq6FBRbiLCE+eC"
}%

But trying a user name with 18 characters in it gives you an INPUT_ERROR:

> curl 'https://keybase.io/_/api/1.0/user/lookup.json?username=abcdefghijklmnopq'
{
  "status": {
    "code": 100,
    "desc": "missing or invalid input",
    "fields": {
      "username": "invalid name"
    },
    "name": "INPUT_ERROR"
  }
}%

That INPUT_ERROR return is consistent for all usernames >17 characters. Seems somewhat arbitrary to limit usernames but maybe there's a reason for it? In any case, mentioning this in the API docs would be a good idea. I pre-check for username length in any client that access the API could give a better error message since the one returned is somewhat ambiguous. Is it invalid because of length? The characters? Because it doesn't belong to a user who exists?

Definitely I'd consider adding this to the doc page for signup.json as it has an impact there as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions