Is there a way to check if a project exists with the Glitch API? When you get
api.glitch.com/projects/project, it returns
null if the project does not exist. The thing is, it also returns
null if the project is private.
So is there a way to check if the project exists at all? I know this is possible because Glitch does it when you type in your project name, but I don’t know how to do it.
Any help is appreciated.
Well, i’m not so sure really, but a request to
PROJECT-NAME.glitch.me usually shows one of two errors
200: It would usually exist
404: Does not Exist
But, someone could just put a “404” Error to block a project.
You could do some sort of validation by
- Looking for a “Waking Up” / “Project not starting” message (unless it is a boosted project/Static Site) to see if it is a real project.
- Looking for the Glitch 404 Not found Error (Pastebin), but that can be easily fooled by the person copying the page.
You could try sending a boot request to the Glitch api on the specific project. However I don’t remember the pathname for that, I might do some research on that later.
yea the pathname is what im trying to figure out
Glitch in the start up, sends a status of 304 after startup
Hi @DerDer56, for security/privacy reasons, we won’t give an indication of whether a private app exists or not to users who are not a member of it.
@jenn but it can be kind of identified whether a private project exists or not. When you name a project, if it tells you that the name exists, and when you check
glitch.com/~privateproject and the page is not found, it means that a private project with that name exists, right?
They could be archived projects.
but then how does glitch see if it exists when you are typing in the project name?
Probably a Boolean. If the project is private it will not show
While there are parts of the Glitch API that are currently public, there are many that are not for privacy and security reasons.
So Glitch the platform can do stuff like handling privacy permissions and authorization that a user would not be able to do. I assume that’s what you’re asking about!
ok, thank you for answering!
you could always just change the name of a project via the api to the name of the thing you want to find and it will tell you if it exists already