Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: adding api_base option #96

Merged
merged 21 commits into from
Oct 15, 2020

Conversation

doankhoi
Copy link
Contributor

No description provided.

@devrnt
Copy link
Owner

devrnt commented Sep 28, 2020

Thanks for your PR. Can I ask why this dynamic api_base is needed? I did a search and did not find anything about this base url in the Intercom docs. Could you provide a link to your source?

@devrnt devrnt added the discussion Get feedback for a possible improvement label Sep 28, 2020
@doankhoi
Copy link
Contributor Author

This is a bug of Intercom, some Internet Service Providers in Vietnam are not connecting to Intercom. Intercom added api_base attribute to their config
Screen Shot 2020-09-28 at 11 49 22 PM

@devrnt
Copy link
Owner

devrnt commented Sep 28, 2020

I see, but I would like a url to some official documentation so I can confirm this. Could you add some tests to make sure there are no side effects?

@devrnt
Copy link
Owner

devrnt commented Oct 5, 2020

@doankhoi Have you got any update on this? Otherwise I'm inclined to close this PR.

devrnt and others added 18 commits October 15, 2020 20:17
@devrnt
Copy link
Owner

devrnt commented Oct 15, 2020

Saw another related issue for a simular Intercom solution: https://github.com/intercom/intercom-rails/pull/329/files

@devrnt devrnt merged commit c8492c8 into devrnt:master Oct 15, 2020
@musiquarc
Copy link

Hello ! Is this fix still up-to-date ? I tried to use the apiBase prop without success. It seems that the official API Doc has changed slightly, introducing a discrepancy between react-use-intercom, and Intercom.

The documentation ( https://developers.intercom.com/installing-intercom/docs/basic-javascript ) gives 3 possible values for api_base :

Regional Location | API Base to Set
US | https://api-iam.intercom.io
EU | https://api-iam.eu.intercom.io
Australia | https://api-iam.au.intercom.io

Hence I don't think the react-use-intercom feature is up-to-date. See current explanation about IntercomProvider's props apiBase :
"apiBase | If you need to route your Messenger requests through a different endpoint than the default. Generally speaking, this is not needed. Format: https://${INTERCOM_APP_ID}.intercom-messenger.com"

I have tried both https://api-iam.eu.intercom.io and https://${INTERCOM_APP_ID}.intercom-messenger.com apiBase formats, without success.

To bypass that problem, I need to delete react-use-intercom and use the traditional HTML Intercom implementation.

Thanks !

@devrnt
Copy link
Owner

devrnt commented Jan 10, 2023

Hi, indeed the according documentation is outdated, but the functionality hasn't changed. You can still set the apiBase if required

@pradeepgill007
Copy link

It does not work for me as well.
I tried to implement it for EU | https://api-iam.eu.intercom.io/

Removing the react-use-intercom package from my project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discussion Get feedback for a possible improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants