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
David C 6David C 6 

Salesforce community REST API for Login, Logout and Self registration

Hi guys,

I created a community for my salesforce developer account. I need to login community via REST API hence I used the below API url as per the documentation
(community url from salesforce)/customers/services/oauth2/authorize
But it did not launch the login page and throws some error like failed with status 404. I dnt find any examples for this case. Moreover I dont find any REST API for logout and Self registration. Can you guys help to get rid off this problem ?

Regards,
David C
James LoghryJames Loghry
Check to make sure you're using HTTPS instead of HTTP.  Also, are you following the format below, parameters and all? 
 
https://<communityUrl>/services/oauth2/authorize?
response_type=token&client_id=your_app_id&redirect_uri=your_redirect_uris

The URL format above is taken from the following link: https://developer.salesforce.com/docs/atlas.en-us.chatterapi.meta/chatterapi/quickstart_communities.htm

Note, if you haven't already, you'll need to create a connected app first.
David C 6David C 6
Hi James,

Thanks for your reply.

Now my login problem is being resolved. I need to know the REST API url for Self Registration and Logout option. Can you help me in this ?

-David C