Closed kareldonk closed 5 months ago
409 is indeed the status code for an already taken username.
You can check if a given username already exists with getUserStatus --username user.111
I tried via the RPC http endpoint with the following:
{
"jsonrpc": "2.0",
"method": "getUserStatus",
"params": {
"username": ["name"]
},
"id": "THIS_ID"
}
And got this:
{
"jsonrpc": "2.0",
"error": {
"code": -32603,
"message": "Cannot invoke \"java.util.Collection.size()\" because \"c\" is null",
"data": null
},
"id": "THIS_ID"
}
I also tried specifying just one username (and not an array) like "username": "name"
but get the same error.
Am I using the wrong syntax?
There's a bug in the command when no recipients are given, as a workaround you can add an empty recipient
array:
{
"jsonrpc": "2.0",
"method": "getUserStatus",
"params": {
"username": ["name"],
"recipient":[]
},
"id": "THIS_ID"
}
Thank you very much
I was tring to change the username via the RPC deamon by sending the following message:
That failed with response:
But if I do a request WITHOUT a discriminator (so just
user
for example), that works, and the server specifies a discriminator in the response.According to the docs, sending a discriminator should also work:
On the command line I also got the same response.
Is this a bug or am I doing something wrong? Perhaps the names were already taken but I tried a number of different discriminators and would still get response 409.