Error 405

Hi all. I’m trying to write my own client for my bot, in order to allow it to play demos on OGS (my bot relays games).
I’m now struggling with the authentication phase, and after trying a lot of different method, including the one mentioned in the API documentation, I found this one almost working (mixing API and external documentation)

    Dim request As WebRequest = WebRequest.Create("")
    request.Method = "POST"
    request.ContentType = "application/x-www-form-urlencoded"
    Dim DataString As StringBuilder = New StringBuilder
    Dim Postdata() As Byte = System.Text.Encoding.Default.GetBytes(DataString.ToString())
    request.ContentLength = Postdata.Length
    Dim tempStream As Stream = request.GetRequestStream()
    tempStream.Write(Postdata, 0, Postdata.Length)
    Dim responseContent As String
    Dim response As WebResponse = request.GetResponse
    Dim reader = New System.IO.StreamReader(response.GetResponseStream())
    responseContent = reader.ReadToEnd()

All lines are logical: I send the authentication request using the “POST” method, then I should get the response (the token) with the “dim response as webResponse = request.getResponse” line; this response is linked to my original request, so it must be this way.
But the server answers with a 405 error (“method not supported”).
cURL works perfectly, by the way, and it uses the same parameters.

I’ don’t know what else to do.

Problem solved. A “/” was missing at the end of the address, so it works when the statement quoted above becomes
Dim request As WebRequest = WebRequest.Create(“”)

It’s very important to get the addresses correct (documentation is not always precise. For example, in this case the address was supposed to be, with 3 errors).