• Harshit Goyal

    Hi Biswajeet,

    I tried creating Rest Endpoint using your class to login community users with help of their username and password.
    But, for my case, its not returning the result as expected .
    Rather it is redirecting me to my community signin url:
    Communityurl/signin?startURL=services/apexrest/api/CommunityLoginAPI

    Any help would be highly appreciated.

    • Hi Harshit,

      Add the url to remote site settings and add logs to check what error you are getting.

      • Harshit Goyal

        Hi Biswajeet ,

        Which URL do we need to at in remote site setting ?
        If you share me you apex class and test class on harshitmp45@gmail.com

        Thanks
        Harshit Goyal

        • Your community URL.

          • Harshit Goyal

            Still redirecting me to site login page .
            Actually on hitting url it doesn’t call rest class , if you can share you class , It would be helpful for me

  • Harshit Goyal

    Hi Biswajeet , is there any other setting we need to enable to hit REST API through site ?

  • amit j

    Hi Biswajeet,

    I tried creating Rest Endpoint using your class to login community users with help of their username and password.
    But, for my case, its not returning the result as expected .
    Rather it is redirecting me to my community signin url:
    Communityurl/signin?startURL=services/apexrest/api/CommunityLoginAPI

    Any help would be highly appreciated.

  • Johan Jacob

    Hi,
    I was using ur class and it works perfectly but while writing a Test class for the same I am having an issue with getting the response at line 48 . It would be really helpful if u could provide the test class as well.

    thank you

  • Havidh

    Hi , can you please help on this, this is not working for me , gettin
    g internal server error for this