How do I configure a remix so my users can get started in one click?

Remix URLs have the following format:

https://glitch.com/edit/#!/remix/project-name

You can populate the values in a project's .env file on Remix. This can be used to automatically set up a project with a user's API keys already in it.

There are two options:

1: URL

Just pop the variable names and corresponding values on the end of your Remix URL, like so:

https://glitch.com/edit/#!/remix/project-name?var1=value1&var2=value2...

2: Programmatically

Or POST to https://api.glitch.com/projects/<project-name>/remix, sending a JSON body like:

{
    env: {
      var1: "value1",
      var2: "value2"
    }
}

It will return:

{
    id: project.id,
    domain: project.domain,
    inviteToken: project.invite_token,
    joinLink: joinLink
}

If you create your Remix using the POST method, keep in mind that the project won't start until someone visits it (either in the Editor, on the project page on glitch.com, or the app's glitch.me page).



For Platforms Sharing Options
Article last updated on