I have created a custom Rest Service in SFDC . There is a external java program who is calling this service getting the error "Peer not Authenthicated". However, it work fine when make a call to standard rest service.

Java program makes login call with username and password , and then make the further calls with access token . If Java program makes standard REST Call (like QUERY,Create ) it's working fine, however if it try to access the Custom Rest resource, it throws an "Peer not authenciated"

Below the login call to get access token,

https://test.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=3MVG9OI03e************pxp1sWHLb6Q3zDATvehioTlzDi5MenWhgq2DwXdqGkkj1KbSHjbrZR7D6_J4w9IN" -d "client_secret=48033*******810169" -d "username=*****al@*****.com" -d "password=test2345"

Please help with this. Why java program is throwing this error when calling custom Rest service. Thanks.

  • 1
    Provide the code where you are authenticating and making the call to the custom rest service? – Eric Dec 5 '14 at 23:52
  • One thing to verify is that the profile of the user used by the Java Program has been granted access to the Apex class used to implement the custom REST service – cropredy Dec 6 '14 at 0:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.