function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bloblo 

Login as communities user via user name / password auth flow?

I want to use username/password oauth flow to login as a Communities user.  Anyone know how to do that?

 

I had done the same oauth for the standard user in other projects without any problem.  The oauth request was similar to this:

 

curl 
--form grant_type=password 
--form client_id=[my_client_id]
--form client_secret=[my_client_secret]
--form username=[username]
--form password=[password]
 
For communities user login, I change the url to https://[communitites subdomain].force.com/[communities name]/services/oauth2/token and it always return error message:
 

{"error_description":"grant type not supported","error":"unsupported_grant_type"}

 

Please help.  Thanks.