Basic auth

Open in

Basic authentication is the simplest way to authenticate with Ably. It requires passing an API key when instancing an SDK.

The following is an example of using basic authentication:

Realtime
REST

1

2

3

const realtime = new Ably.Realtime({
  key: 'demokey:*****'
});
API key:
DEMO ONLY

Basic auth architecture

The process used by Ably SDKs to authenticate with Ably using basic authentication is illustrated in the following diagram: