How can I use the grant_type=password oauth flow with salesforce.com? -
i'm trying authorization token using username-password flow (as described in final section of this article).
i'm sending following request (using python's httplib, in case that's relevant):
https://login.salesforce.com/services/oauth2/token post data: username=<un>&client_secret=<consumer_secret>&password=<pw+token>&grant_type=password&client_id=<consumer_key> and getting response:
400 bad request {"error":"unsupported_grant_type","error_description":"grant type not supported"} is password grant_type unsupported, or missing something? seems give error when i'm sending grant_type work (such authorization_code).
note i've tried suggestions in answer here, , don't work me.
typically because content-type header has not been set correct value, should application/x-www-form-urlencoded.
also make sure parameters correctly encoded (especially if you're building post payload hand).
Comments
Post a Comment