All Products
Search
Document Center

ApsaraDB RDS:Use the RDS Supabase SDK

Last Updated:Dec 22, 2025

This topic describes how to use the RDS Supabase SDK in various programming languages.

Prerequisites

An RDS Supabase project has been created.

Get the Supabase URL and Supabase Key

  1. Go to the RDS console home page. In the navigation pane on the left, click AI Application Development.

  2. Select a region at the top. In the RDS Supabase list, click View Details in the Actions column for the target project.

  3. On the Basic Information page, in the Whitelist Information section, click Add Whitelist Group to add the target client's IP address to the whitelist.

  4. In the Network Information section, click Public Endpoint to open the RDS Supabase logon page.

  5. Enter the default username supabase and the password to log on to the RDS Supabase project.

  6. Click Connect. On the Connect to your project page, click App Frameworks to obtain the Supabase URL and Supabase Key.

    image

SDK usage guide

JavaScript

  1. Install the supabase package.

    npm install @supabase/supabase-js
  2. Use the Supabase SDK in your code. For example:

    import { createClient } from "@supabase/supabase-js";
    
    const supabaseUrl = "SUPABASE_URL";
    const supabaseKey = "SUPABASE_KEY";
    
    const supabase = createClient(supabaseUrl, supabaseKey);
    

Python

  1. Install the supabase package.

    pip install supabase
  2. Use the Supabase SDK in your code. For example:

    import os
    from supabase import create_client, Client
    
    url: str = os.environ.get("SUPABASE_URL")
    key: str = os.environ.get("SUPABASE_KEY")
    supabase: Client = create_client(url, key)

Flutter

  1. Install the supabase package.

    flutter pub add supabase_flutter
  2. Use the Supabase SDK in your code. For example:

    Future<void> main() async {
      await Supabase.initialize(
        url: 'https://xyzcompany.supabase.co',
        anonKey: 'public-anon-key',
      );
    
      runApp(MyApp());
    }
    
    // Get a reference your Supabase client
    final supabase = Supabase.instance.client;

Swift

  1. Install the supabase package.

    let package = Package(
        ...
        dependencies: [
            ...
            .package(
                url: "https://github.com/supabase/supabase-swift.git",
                from: "2.0.0"
            ),
        ],
        targets: [
            .target(
                name: "YourTargetName",
                dependencies: [
                    .product(
                        name: "Supabase", // Auth, Realtime, Postgrest, Functions, or Storage
                        package: "supabase-swift"
                    ),
                ]
            )
        ]
    )
  2. Use the Supabase SDK in your code. For example:

    import Supabase
    
    let client = SupabaseClient(supabaseURL: URL(string: "https://xyzcompany.supabase.co")!, supabaseKey: "public-anon-key")

C#

  1. Install the supabase package.

    dotnet add package supabase
  2. Use the Supabase SDK in your code. For example:

    var url = Environment.GetEnvironmentVariable("SUPABASE_URL");
    var key = Environment.GetEnvironmentVariable("SUPABASE_KEY");
    
    var options = new Supabase.SupabaseOptions
    {
        AutoConnectRealtime = true
    };
    
    var supabase = new Supabase.Client(url, key, options);
    await supabase.InitializeAsync();

Kotlin

Use the Supabase SDK in your code. For example:

val supabase = createSupabaseClient(
    supabaseUrl = "https://xyzcompany.supabase.co",
    supabaseKey = "public-anon-key"
) {
    install(Auth)
    install(Postgrest)
    //install other modules
}

For more information, see https://supabase.com/docs.