You need to sign in to do that
Don't have an account?
Trying to Allocate OAUTH2 Token - Receive 400 Error on Locally Hosted Website
Our Salesforce instance has a REST API that is utilized by our .NET application - data is sent from the .NET app (hosted in Microsoft Azure) to the REST API and saved in Salesforce. As part of this communication, we retrieve tokens from the OAUTH2 service - the call to get the token is made, of course, from the .NET app.
Recently one of our .NET developers spun up the app in a locally hosted environment, and all of a sudden the OAUTH2 token call no longer works. He receives a "400 unknown_error" response when trying to call this service. We have tested the service call from Postman and it works; we have also inspected the outgoing call from the locally hosted .NET app and see absolutely no difference between this and the Postman call.
To recap: the call works from the Azure-hosted version of the app, and it works from the locally running Postman software; but the locally-hosted app gets a 400 error every time. As far as I can tell, the messages going out are exactly the same between the three scenarios.
Any thoughts on why this is and how we can fix it?
https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/quickstart_oauth.htm