Skip to content
Back

Project is not accessible in this region. Please make sure you are using the correct endpoint

  • 0
  • Functions
  • Cloud
bluesky
30 Oct, 2025, 10:45

Context: I'm changing my region from German to Singapore.

Sample code on Go appwrite function:

TypeScript
package handler

import (
    "os"

    "github.com/appwrite/sdk-for-go/appwrite"
    "github.com/appwrite/sdk-for-go/client"
    "github.com/open-runtimes/types-for-go/v4/openruntimes"
)

var (
    appwriteClient client.Client
)

func Main(Context openruntimes.Context) openruntimes.Response {
    appwriteClient = appwrite.NewClient(
        appwrite.WithEndpoint(os.Getenv("APPWRITE_FUNCTION_API_ENDPOINT")),
        appwrite.WithProject(os.Getenv("APPWRITE_FUNCTION_PROJECT_ID")),
        appwrite.WithKey(Context.Req.Headers["x-appwrite-key"]),
    )

    Context.Log(os.Getenv("APPWRITE_FUNCTION_API_ENDPOINT"))

    tablesDB := appwrite.NewTablesDB(appwriteClient)

    if Context.Req.Path == "/cek" {
        if Context.Req.Method == "GET" {

            response, err := tablesDB.ListRows("68f8e75900141e1e5ca6", "hargadomain")
            if err != nil {
                Context.Error("Gagal ngambil row: ", err)
                return Context.Res.Send(err.Error(), Context.Res.WithStatusCode(500))
            }

            return Context.Res.Json(response)

        } else {
            return Context.Res.Send("Metode tidak diizinkan.", Context.Res.WithStatusCode(405))
        }
    }

    return Context.Res.Send("Endpoint tidak ditemukan.", Context.Res.WithStatusCode(404))
}

Error: Project is not accessible in this region. Please make sure you are using the correct endpoint

TL;DR
Developers are having trouble accessing their project after changing their region to Singapore. The issue might be due to the incorrect endpoint being used in the code. They should manually set the endpoint to https://sgp.cloud.appwrite.io/v1. They should also log the APPWRITE_FUNCTION_ENDPOINT env variable for debugging.
D5
30 Oct, 2025, 10:52

Try logging the APPWRITE_FUNCTION_ENDPOINT env variable

bluesky
30 Oct, 2025, 10:53

https://cloud.appwrite.io/v1

I'm expecting is my new region, which is https://sgp.cloud.appwrite.io/v1

D5
30 Oct, 2025, 10:54

You're executing it locally?

bluesky
30 Oct, 2025, 10:54

True

D5
30 Oct, 2025, 10:56

Then that could be the reason I think πŸ€”

D5
30 Oct, 2025, 10:56

Try setting it manually meanwhile πŸ˜…

bluesky
30 Oct, 2025, 10:59

Manually solve, xixi

bluesky
30 Oct, 2025, 10:59
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