SurrealDB HTTP API
Authorization: Basic <credential> Create credentials when you start or configure a SurrealDB instance. For self-hosted instances, start the server with surreal start --user <username> --pass <password> as shown in the HTTP protocol setup and CLI overview. For SurrealDB Cloud, create an instance in Create an instance, then connect to that instance as described in Connecting to Cloud. Namespace- and database-scoped users can also be used where supported via the --auth-level flow documented on `surreal sql`.
Authorization: Bearer <credential> Mint a token by signing in to a SurrealDB instance through the documented auth flow. The REST API exposes `POST /signin`, and the CLI can also connect with an existing token via `surreal sql --token`. For Cloud, first create an account and instance via Cloud management and Create an instance, then sign in to that instance and reuse the returned JWT as a Bearer token.