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
Fi MercerFi Mercer 

Username-Password Authentication Using Rest

Hi,

We are having an error using username-password oauth via REST. The error is Error ID: 829418965-82071 (801801977). This is only happening when we are running the API call on our AWS server. But it doesn't show when we are running the API calls on our local machines. We tried adding the IP address of the AWS server on the Trusted IP of Sandbox salesforce but still got the error. Do you guys have any idea what might have cause the error? Thank you in advance.

With kind regards
LBKLBK
Are you using a Named Credential to access the API?

If not, you need to create a Remote site before accessing a URL from within Salesforce.

If you have a CURL command to execute the API call, please share it so that we can take a look.
Fi MercerFi Mercer
Hi LBK, thank you for the quick response, we appreciate it. we are not using named credential to access the API. The url of our website is also in the remote site of the salesforce sandbox. what we are doing is first authenticate using this call https://test.salesforce.com/services/oauth2/token on rest with content_type application/x-www-form-urlencoded then use the instance_url, token_type, and access_token for the succeeding calls. but the error shows on the https://test.salesforce.com/services/oauth2/token call when on our server. not sure if this will help but the error mentioned is an internal server error.