Back

How to retrieve the autogenerated domain url inside a function ?

  • 0
  • Functions
Arkany
7 Jan, 2024, 00:04

Is there an environment variable that I can use to retrieve the auto generated domain of a function. ? I would like to provide it as a callback url to an api. Thanks in advance.

TL;DR
User is asking for a way to retrieve the auto-generated domain URL of a function. They want to use it as a callback URL for an API. No environment variable or header exists to directly retrieve the domain URL. However, the user can create a function variable with the domain URL manually. Alternatively, if someone has a suggestion to retrieve the value via CLI, the user can create a variable via CLI for automated configuration.
Drake
7 Jan, 2024, 02:12

If anything, it might be in the headers. Otherwise, you may need to use an environment variable.

Arkany
8 Jan, 2024, 13:22

Unfortunately there is no header with the generated domain. I know that I can create a function variable with it but I wanted to have a fully automated process via cli with no human intervention to configure my Appwrite backend instance. I'm almost there this was the last bit of configuration remaining. If someone have a suggestion to retrieve that value via cli that's fine too because then I can create a variable via cli.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more