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

Can we get siteEndpoint in our code (v4) #9792

Closed
sunshineo opened this issue Aug 30, 2023 · 2 comments
Closed

Can we get siteEndpoint in our code (v4) #9792

sunshineo opened this issue Aug 30, 2023 · 2 comments
Assignees
Labels

Comments

@sunshineo
Copy link

For our prod environment, it is fixed after deploy so we were able to copy it, but for the local development, it is a dynamic ngrok url. How can we get that value in our code?
I see getBotSiteEndpoint here in some test code that parses the config file, is that the only way?

@microsoft-github-policy-service
Copy link
Contributor

Thank you for contacting us! Any issue or feedback from you is quite important to us. We will do our best to fully respond to your issue as soon as possible. Sometimes additional investigations may be needed, we will usually get back to you within 2 days by adding comments to this issue. Please stay tuned.

@XiaofuHuang
Copy link
Contributor

In Teams Toolkit V4, you can obtain the dynamic ngrok URL either by accessing the ngrok web interface (sample code) or retrieving it from the .fx\states\state.local.json file.

In Teams Toolkit V5, it's possible to modify the teamsapp.local.yml file and include the BOT_ENDPOINT within the runtime environment variables.

...
deploy:
  ...
  - uses: file/createOrUpdateEnvironmentFile
    with:
      target: ./.localConfigs
      envs:
        BOT_ID: ${{BOT_ID}}
        BOT_PASSWORD: ${{SECRET_BOT_PASSWORD}}
        BOT_ENDPOINT: ${{BOT_ENDPOINT}}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants