Back

What is a “Platform” for?

  • 0
  • Web
jonericcook
26 Jan, 2024, 15:27

I don’t understand why I would need to create a Platform on appwrite.

Is a Platform a server side concept? I see you can create an API key for it and since API keys should be used serve side since they would be exposed in a react app.

When would I need to use a Platform.

Would it be possible to explain it in a todo app example?

If you want to create a todo list you need to sign up and sign in.

TL;DR
Developers in a support thread are discussing the concept of a "Platform" in relation to a CORS error on their Vercel app. The developers are unsure why creating a Platform is necessary and what its purpose is. Another developer explains that adding a Platform is necessary to ensure that only specified frontend applications can communicate with the Project for security reasons. They provide an example of adding a web Platform with the hostname of the todo app to allow it to communicate with the Appwrite instance. Finally, they explain that in order to create a todo list, signing up and signing in is required.
Kenny
26 Jan, 2024, 15:31

If you want your todo application to be able to talk to your appwrite instance you'll need to add it as a platform.

So for example, if you have todo-app.com, you'll want to add a web platform with the hostname of todo-app.com.

ideclon
26 Jan, 2024, 15:35

Basically, it’s for security - only frontend applications specified as a Platform can talk to your Project

kamal.panara
26 Jan, 2024, 15:45

and API keys are used with server SDK.

jonericcook
26 Jan, 2024, 15:48

but i just now did this quickstart https://appwrite.io/docs/quick-starts/react and didnt create a platform and was able to create an account and all that

Kenny
26 Jan, 2024, 15:51

So you didn't do step one in the quick start?

ideclon
26 Jan, 2024, 15:52

Are you on localhost? I believe localhost works without a Platform

jonericcook
26 Jan, 2024, 15:54

ill run my app on vercel and see if it breaks

jonericcook
26 Jan, 2024, 15:59

ok so my vercel app got hit a CORS error

jonericcook
26 Jan, 2024, 15:59

so cool

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more