amazon-connect / amazon-connect-salesforce-lambda

Apache License 2.0
45 stars 34 forks source link

URL_NOT_RESET: Destination URL not reset. The URL returned from login must be set #4

Open ColWillis opened 3 years ago

ColWillis commented 3 years ago

Hi,

I just recently upgraded to 5.7 (from 4.0.1), I am now seeing the below error when trying to execute the sfinvokeAPI in the Lambda Console.

The Amazon Connect is configured against test.salesforce.com v49.0.

Any suggestions?

Thanks in advance!

I am using this payload:

{
  "Details": {
    "Parameters": {
      "sf_operation": "phoneLookup",
      "sf_phone": "+447729231375",
      "sf_fields": "Id, Name, Email, Account.Name, Account.OwnerID"
    }
  }
}

Error message:

{
  "errorMessage": "URL_NOT_RESET: Destination URL not reset. The URL returned from login must be set",
  "errorType": "Exception",
  "stackTrace": [
    "  File \"/var/task/sfInvokeAPI.py\", line 55, in lambda_handler\n    resp = phoneLookup(sf, event['Details']['Parameters']['sf_phone'], event['Details']['Parameters']['sf_fields'])\n",
"  File \"/var/task/sfInvokeAPI.py\", line 115, in phoneLookup\n    records = sf.parameterizedSearch(data=data)\n",
"  File \"/var/task/salesforce.py\", line 114, in parameterizedSearch\n    resp = self.request.post(url=url, data=data, headers=self.headers)\n",
"  File \"/var/task/salesforce.py\", line 205, in post\n    return __check_resp__(r)\n",
"  File \"/var/task/salesforce.py\", line 240, in __check_resp__\n    raise Exception(msg)\n"
nikhil-g777 commented 3 years ago

I think it might be an issue with your salesforce credentials in secrets manager. I came across the same issue and on checking the he salesforce API user, the user got locked out because of too many incorrect login attempts, so you could try resetting the password and unlocking the user