Skip to content
Back

How Can I Create landing page in appwrite function.

  • 0
  • 2
  • Functions
showmore
24 Jan, 2026, 07:48

I created function called invoice URL https://app.getrestt.com/v1/functions/invoice/executions?id=test-76f948fe83c43422561fe096c0674a1bd3ff0702cdfcf2444293ab31937a9c4d, i make it permission to any. and I deploye the code like this , when i try to access it in public browser, i get this error {"message":"No Appwrite project was specified. Please specify your project ID when initializing your Appwrite SDK.","code":401,"type":"general_access_forbidden","version":"1.7.4"} how can i manage this ? its possible to use function for this purpose ?

TL;DR
To create a landing page in appwrite function: 1. Make sure to add your project ID at the end of the URL. 2. Ensure that you have the correct permissions set up in the function. 3. Check if you are using a custom domain and if it matches the one in the Domains tab. 4. Import `Query` in your code if you are using it. 5. When getting data from a response, extract only the required part.
24 Jan, 2026, 08:02

Can you try adding your project ID at the end of the URL? Like this: https://app.getrestt.com/v1/functions/invoice/executions ?id=test-76f948fe83c43422561fe096c0674a1bd3ff0702cdfcf2444293ab31937a9c4d &project=<your_projectID>

24 Jan, 2026, 08:16

Thanks for your response {"message":"User (role: guests) missing scope (execution.read)","code":401,"type":"general_unauthorized_scope","version":"1.7.4"} but i used User : any i checked all permission inside the function , but still same

24 Jan, 2026, 13:25

You are using custom domain right?

24 Jan, 2026, 13:28

And are you sure this domain you're using is same as the one in Domains tab ?

24 Jan, 2026, 13:33

Also, there are two more issues I found:

  1. You haven't included Query in imports but you're using it in your code. It should be like this: import { Client, Databases, Query } from "node-appwrite";
  2. Also, you are returning entire object in invoice. It should be something like this to extract only the required part from the response:
TypeScript
const response = await databases.listDocuments(
   process.env.DATABASE_ID,
   process.env.INVOICE_COLLECTION_ID,
   [
     Query.equal('irn', invoiceId)
   ]
);
const invoice = result.documents[0];
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