1

I am hitting Salesforce api using restforce gem. But on my local it is working completely fine for every case. But on staging server(AWS), it's throwing the following exception:

Restforce::UnauthorizedError · app/services/sales_force_methods.rb:23
  Connection prefix not set

Any pointers on same?

Sachin
  • 963
  • 11
  • 31

1 Answers1

2

Make sure that the client id (SALESFORCE_USERNAME environment variable) is set to the correct value.

Jenna Pederson
  • 5,656
  • 1
  • 19
  • 20
  • This seems to be self-contradictory. According to the [Restforce](https://github.com/restforce/restforce) documentation, the client id would correspond to the `SALESFORCE_CLIENT_ID` environment variable. The `SALESFORCE_USERNAME` environment variable is for the username. – user1070300 Aug 11 '23 at 13:46