• Carlo Fretti
  • NEWBIE
  • 15 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 3
    Replies
I need to configure Username-Password OAuth Authentication to get salesforce data with the REST API through a community users. Is is possible to do that?

hi,

 

My mobile app login to salesforce org using the ouath username/password flow before and work fine. Related document:

https://help.salesforce.com/help/doc/en/remoteaccess_oauth_username_password_flow.htm

 

But now the situation changes!  I need to change the user from standard user to communities user.  I've setup the communities and created a new communities user in SFDC.  I can login to the communities in https://[my-communities-domain].force.com/[my-communities-name]/login without any problem.

 

And then I read the instruction on page 32-34 of following document and try to login with chatter api instead, as the new user is a communities user.

http://www.salesforce.com/us/developer/docs/chatterapi/salesforce_chatter_rest_api.pdf

 

curl --form client_id=[my client id] --form client_secret=[my client secret] --form grant_type=password --form username=[username@some.domain] --form password=[user password] https://[my-communties-domain].force.com/[my-communities-name]/services/oauth2/token 

 

It fails and responds with json string:

 

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

 

 

I also try to add header with different content type but same error report.

-H "content-type: application/x-www-form-urlencoded"

 

 

The sample curl of login api in the chatter rest api document page 34:

 

curl --form client_id=3MVG9PhR6g6B7ps4xDycwGrI4PvjVZvK9
--form client_secret=8870355475032095511
--form grant_type=password
--form username=admin@seattleapps.com
--form password=1Lsfdc!
https://communitydomain.force.com/communitypath/services/oauth2/token

 

Regards,

Billy Lo

  • August 19, 2013
  • Like
  • 1

Hi ,

i have been getting this mail from salesforce form yesterday.

 

Your organization (XYZ) has reached its hourly limit for processing workflow time triggers. Processing will resume in the next hour. For information on application limits, see the salesforce.com online help.

 

Could anybody guide me to take corrective as well as preventive action for this?