0

When trying to check the availability of usernames at the matrix.org server using the Matrix protocol with the following command

curl -H "Content-Type: application/json" -X GET "https://matrix.org/_matrix/client/v3/register/available?username=john" -d "{}"

or this simplified one

curl -X GET "https://matrix.org/_matrix/client/v3/register/available?username=john"

I always get the error

{"errcode":"M_UNKNOWN","error":"Server is unavailable"}

I believe I send the request according to the specification, for a version that is supported by the server. The server is clearly available, as it 1. responds to the requests above (albeit with an error) and 2. responds correctly to a version request:

curl -H "Content-Type: application/json" url -X GET "https://matrix.org/_matrix/client/versions" -d "{}"

What am I doing wrong?

2
  • I'm getting HTTP status code 429 when trying that request in my browser, and according to their docs it means, "This request was rate-limited." I am getting the same JSON response as you have above though, and not the one described here, spec.matrix.org/v1.11/client-server-api/#rate-limiting - no retry_after_ms in the JSON, and no Retry-After response header either. Commented Apr 9 at 11:52
  • 1
    your request is bogus as you're doing a GET request with a json request body, but even when you fix that, the server still doesn't work. you should contact matrix.org , their api does not behave as documented wrt spec.matrix.org/v1.11/client-server-api/… Commented Apr 9 at 13:42

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.