Getting rest API error

I will do local setup of sugar crm when i run the URL i am getting rest API error. i will set .htaccess and config file.

http://localhost/sugar_2021/rest/v11_13/oauth2/token?platform=base

{"error":"no_method","error_message":"Could not find a route with 2 elements"}

Parents
  • It looks like you are trying to get an oauth2 token with a GET request.

    oauth2 is a POST request with a request body with five parameters, so you have to specify a body:

    POST <your_path_to_sugar>/rest/v11_13/oauth2/token BODY

    {
      "grant_type": "password",
      "client_id": "...",
      "client_secret": "",
      "username": "....",
      "password": "....",
      "platform": "...."
    }
Reply
  • It looks like you are trying to get an oauth2 token with a GET request.

    oauth2 is a POST request with a request body with five parameters, so you have to specify a body:

    POST <your_path_to_sugar>/rest/v11_13/oauth2/token BODY

    {
      "grant_type": "password",
      "client_id": "...",
      "client_secret": "",
      "username": "....",
      "password": "....",
      "platform": "...."
    }
Children
No Data