Getting "Request method not allowed" for Post request to get access-token

Arulmuruga
Hi,
I get the following response while fetching the access token

{
"status": "error",
"message": "Request method not allowed",
"data": null,
"error_type": "GeneralException"
}
My request is like this ..

POST / HTTP/1.1
Host: api.kite.trade
Accept: application/json
Content-Type: application/json
Content-Length: 174

{
"api_key" : "aaaaaaaaaaa",
"request_token" :"bbbbbbbbb",
"checksum" : "cccccccccccc"
}

could you please suggest on how to resolve this ?
Tagged:
  • sujith
    You might be hitting the wrong API endpoint. You can check out the correct endpoint here.
  • Arulmuruga
    @sujith , Thanks ...After changing the endpoint , i am getting the following response

    "We're sorry but kite doesn't work properly without JavaScript enabled. Please enable it"

    here is my full request..

    POST /session/token HTTP/1.1
    Host: kite.zerodha.com
    Content-Type: application/json
    Content-Length: 177

    {
    "api_key" : "aaaa",
    "request_token" :"bbbb",
    "checksum" : "ccc"
    }

    what correction should i make here ?
  • rakeshr
    @Arulmuruga
    That's not the correct endpoint. You can check the exact POST request param in this documentation.
Sign In or Register to comment.