Get the ID of other projects

Is there a way to get the ID of projects that aren’t yours?

I know that you can get the ID of YOUR repl through Custom Domain which is 1. annoying and 2. hard but at least that works. I know that Auth gives you this: https://replit.com/site/authWithReplcoCloser?domain=7abd9ac5-e3ba-4a57-98ce-0910a22c121d.id.repl.co which contains the ID. Not all repls have Auth.

I don’t know much, if anything, about Replit GraphQL but maybe it could help with this.

2 Likes

It is possible to get the ID of a repl via GQL. I’m not sure how much those who know any GQL (I don’t really count, lol) can say.

2 Likes

normally I would provide you with code, but recently there’s been an even harder clamp down so for all intents and purposes, no there is no way

2 Likes

No, there is no way to do this, or no, you can’t do with with Replit GraphQL? Or no, you can but you won’t?

3 Likes

this is what I meant sorry

2 Likes

Well, why not? Also that probably sounded rude, but I’m just curious to know.

1 Like

oh because of recent clamp downs on the GQL

Type echo $REPL_ID in the shell.

3 Likes

I can only do that on my repls, but thanks, that makes getting my repls’ IDs easier.

Let me just update my package, I was going to add repl query’s but never got around to it.

If the repl has a web server you can always make a HEAD request to https://<repl>.<user>.repl.co/__repl and parse the response

Ray shared this on one of their git repos, so I think it’s ok to share:

query ReplID ($url: String) {
  repl(url: $url) {
    ...on Repl { id }
  }
}

Basically send a get request to Replit.com/graphql with the necessary headers and the right payload format, query and vars, in vars put ”url”: “replurl”.
The response should be json containing the repl’s repl id.

3 Likes

bruh bruh bruh did you not read any of my posts :man_facepalming: I said we can’t share ZILCH about the schema because of the new restrictions

Uhh thanks @MiloCat I hope you don’t delete your post :slight_smile:
What I did was this:


on https://graphql-playground.pikachub2005.repl.co/ but that didn’t seem to work. I got my connect.sid and I don’t know what’s wrong…

1 Like

firstly, you don’t need a sid for that one. Second, it’s like https://replit.com/@user/repl_slug. Third, I’m sorry, you seem like a nice guy but we just can’t let any of it happen :frowning:

1 Like

Thanks @bigminiboss. I really don’t get why this is such a big problem but I guess it’s a Replit thing :man_shrugging: soo I don’t want to be the bad guy here. Should I just not use this or… idk. For now, I’ll just stay far far away from GraphQL because I think it’s still not fully ready for everyone.

2 Likes

Abuse. Too many people abusing GQL.

There are lots of rules about GQL and I’m not sure any of them are official. Don’t use mutations but I forgot what those are.

That is a good idea. Several people, even prominent community members, have been banned for GQL-related stuff.

1 Like

Just so you know, this would work for your use case, and it doesn’t require GQL.

Javascript (node with the fetch api or node-fetch)

const repl = "https://shadowbyte.doxr.repl.co";
const res = await fetch(`${repl}/__repl`, { method: "HEAD", redirect: "manual" });
const [,replid] = res.headers.get("location").match(/https:\/\/replit.com\/replid\/([\w-]+)/);
console.log(replid); // 9a551a5f-60e6-460e-9cee-67bc19c9cc5c
4 Likes

I did but ray literally put that in one of his public github repos so it’ll be fine lol
And it’s just a query

Why was someone else marked as solution ;-;