# How to query Salesforce using EasyMorph 4.6

**URL:** <https://community.easymorph.com/t/how-to-query-salesforce-using-easymorph-4-6/2389>\
**Category:** Articles\
**Created:** [January 19, 2021, 12:39pm UTC](https://community.easymorph.com/t/how-to-query-salesforce-using-easymorph-4-6/2389 "2021-01-19T12:39:40Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![roberto](https://community.easymorph.com/user_avatar/community.easymorph.com/roberto/32/8595_2.png) [@roberto](https://community.easymorph.com/u/roberto)\
**Post date:** [February 4, 2021, 6:41pm UTC](https://community.easymorph.com/t/how-to-query-salesforce-using-easymorph-4-6/2389/4 "2021-02-04T18:41:11Z")

</div>

Hello Olysak,

Now I know what was going on! I was connecting a sandbox org, so in that case the flow endpoints should be "[test.salesforce.com](http://test.salesforce.com)" or include My Domain.

Regarding My Domain, it seems to always work, be it a production org, developer org or sandbox org.

In the following Salesforce help article about OAuth Flow Endpoints, at the end of the article it is stated:

_All endpoints require secure HTTP (HTTPS). Instead of using [login.salesforce.com](http://login.salesforce.com), you can also use the My Domain, Experience Cloud site, or [test.salesforce.com](http://test.salesforce.com) (sandbox) domains in these endpoints. For hostname, use the My Domain, Experience Cloud site, or custom URL._

[https://help.salesforce.com/articleView?id=sf.remoteaccess\_oauth\_endpoints.htm&type=5](https://help.salesforce.com/articleView?id=sf.remoteaccess_oauth_endpoints.htm&type=5)

* * *

I had another question regarding refresh tokens. At the beginning of January I was having problems with the "Web Location" connector because after a certain timeout (in Salesforce the maximum timeout value is 24 hours), the connected app is disconnected, the connector isn't able to obtain a refresh token, and has to be authorized again in the Connector Manager, see this thread:

> [@OAuth2 connection only working for 20 minutes](https://community.easymorph.com/t/oauth2-connection-only-working-for-20-minutes/2272/6):
>
> Hi Roberto, Are you using Exact Online also ? If that's the case which redirect url do you use. I am using the postman callback url, but it stopped working with an unauthorized client error message.

However, yesterday I saw that some connectors I authorized weeks ago were still working correctly! Has something changed in the way EasyMorph is managing the refresh tokens?

Thanks a lot,

Roberto

---

_[View the full topic](https://community.easymorph.com/t/how-to-query-salesforce-using-easymorph-4-6/2389)._
