Spin up a quick repl from a URL

Hi. We used to quickly share code from a code block by appending the code to the URL https://replit.com/languages/python3/?code=. It was sufficient for simple use cases like sharing single file snippets.

However, passing the code as a URL query parameter no longer works these days, and I’m wondering if there is still a way to do the same thing but maybe with a different form of URL. Any help will be greatly appreciated!

Hi @p359101898 , welcome to the forums!
When you said that:

Do you mean that it just opens a new repl? It does that for me.

1 Like

Yeah, I was using URLs like this one: https://replit.com/languages/python3/?code=print(%22hello%22)%0A

1 Like

The intended behavior is that a new repl should be opened with the code passed in the URL query parameter, i.e. the part after code=.

Just to be clear, I want to note that the current behavior when using the link is that the user is required to sign in, and for a signed-in user, a new empty repl is prompted to be created. This is different from the intended behavior mentioned above.

1 Like

Hi @p359101898 thanks for your question.

I don’t think that method of coding via URL would be supported any longer.

However if you want a way of allowing users / students of creating copies of programs you have pre-created you can use Teams for Education for free. Find out more here: https://replit.com/site/teams-for-education

Hope this helps.

1 Like

Understandable. Thanks for the response :grinning:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.