Embed repl by id

Is it possible to embed a repl using an id instead of the slug repl link? If so I would like to know how, if it requires graphql, just tell me, and I will find myself a solution.

If you’re talking about the id that’s returned in all graphql queries, then you can embed:
REPL_ID.id.repl.co

https://5410d169-c670-465b-ae3f-42776c4a84f9.id.repl.co/

You probably already know this but I think you can also get the ID in the Custom Domain Linking window

I know the id corresponds, but i am talking about this embed: https://docs.replit.com/hosting/embedding-repls
Not just an iframe to a website.

Try embedding “https://replit.com/replid/REPL_ID

Nope, does not work. (404)

What repl are you trying to embed?

I tried it on a random repl of mine and it works:

https://replit.com/replid/4cc2454a-72b0-4ca4-bbae-de69ac807486

(It doesn’t have a webview)

trivial conversion, just use GQL to get by id

from replit_bot import gql

x = gql("", "repl", {"id": "YOUR_ID"})

print(x["repl"]["slug"]

3 Likes

pretty sure you can get slug by replid with gql

edit:
bigminiboss already showed this xD

graphql works but @dragonhunter1 said:

1 Like

I will! But, I will use my lib of course, as I have already been for my current project :slight_smile: (And it is async)

2 Likes

I will have to add a repl feature to my lib, I just realized XD

1 Like

oh yeah sorry I see that now

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