Check the "grant_type" parameter
15:42 02 Jun 2016

I am using OAuth 2.0 for authorization according to this documentation :(https://developers.vendhq.com/documentation/oauth.html#oauth) and having this error:

"error": "invalid_request", "error_description": "The request is missing a required parameter, includes an invalid parameter value, includes a parameter more than once, or is otherwise malformed. Check the \"grant_type\" parameter."

Request

Method : POST

Content-Type: application/x-www-form-urlencoded

URL : https://{domain_prefix}.vendhq.com/api/1.0/token

Parameters :

code          = {code}

client_id     = {app_id}

client_secret = {app_secret}

grant_type    = authorization_code

redirect_uri  = {redirect_uri}
oauth-2.0