I have trial Enterprise account and I can successfully obtain a token with the below curl.
curl -v https://eu31.salesforce.com/services/oauth2/token -d "grant_type=password" -d "client_id=xxxxxxxxxxxxxxxxxxxxxxx" -d "client_secret=xxxxxxxxxxxxxxxxxxxxxxx" -d "[email protected]" -d "password=xxxxxxxxx" -k
Since I can't use SCIM APIs with an Enterprise trial, created another developer trial account and configured the exact same as previous. But now, the exact same request template doesn't return an error nor a token. Instead, it sends a redirect as below.
curl -v https://ap17.lightning.force.com/services/oauth2/token -d "grant_type=password" -d "client_id=XXXXXXXXXXXXXXXXXX" -d "client_secret=XXXXXXXXXXXXXXXXXX" -d "[email protected]" -d "password=XXXXXXXXXXXXXXXXXX" -k
Response (No response payload. Just a redirect.)
< HTTP/1.1 302 Found
< Location: https://ap17.salesforce.com/services/oauth2/token
Between the two requests, only the host name(copied from the browser URL) and the credentials are different.And they are correct.
Can anyone think of a reason for this?
Thanks in advance.