SupabaseClient

interface SupabaseClient

The main class to interact with Supabase.

To add functionality, add plugins like Auth or Functions within the SupabaseClientBuilder

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The custom access token provider used to provide custom access tokens for requests. Configured within the SupabaseClientBuilder

Link copied to clipboard
abstract val coroutineDispatcher: CoroutineDispatcher

The default dispatcher used for launching long running jobs

Link copied to clipboard

The default serializer used to serialize and deserialize custom data types.

Link copied to clipboard

The http client used to interact with the Supabase api

Link copied to clipboard

The plugin manager is used to manage installed plugins

Link copied to clipboard
abstract val supabaseHttpUrl: String

The supabase url with either a http or https scheme.

Link copied to clipboard
abstract val supabaseKey: String

The api key for interacting with the supabase api

Link copied to clipboard
abstract val supabaseUrl: String

The base supabase url without any scheme

Link copied to clipboard
abstract val useHTTPS: Boolean

Whether supabaseHttpUrl uses https

Functions

Link copied to clipboard
abstract suspend fun close()

Releases all resources held by the httpClient and all plugins the pluginManager

Link copied to clipboard

Creates a SupabaseApi for the given plugin All requests will be resolved using the MainPlugin.resolveUrl function

fun SupabaseClient.supabaseApi(resolveUrl: (path: String) -> String, parseErrorResponse: suspend (response: HttpResponse) -> RestException? = null): SupabaseApi

Creates a SupabaseApi with the given resolveUrl function All requests will be resolved using this function

fun SupabaseClient.supabaseApi(baseUrl: String, parseErrorResponse: suspend (response: HttpResponse) -> RestException? = null): SupabaseApi

Creates a SupabaseApi with the given baseUrl All requests will be resolved relative to this url