Available methods
The Ruby SDK mirrors the Backend API. The SDK is organized into resources, which are listed below. Each resource has a set of methods that correspond to the API endpoints.
All examples assume you have an instance of the Clerk::SDK:
sdk = Clerk::SDK.newAllowlist identifiers
The following methods are available for managing allowlist identifiers.
Retrieve the list of allowlist identifiers
sdk.allowlist_identifiers.allAdd a new allowlist identifier
If notify is true, an email will be sent to notify the owner of the identifier.
sdk.allowlist_identifiers.create(identifier: "john@example.com", notify: true)sdk.allowlist_identifiers.delete("alid_xyz")sdk.allowlist.update(restricted_to_allowlist: true)sdk.clients.find("client_xyz")sdk.clients.allsdk.clients.verify_token("jwt")sdk.sessions.find("sess_xyz")sdk.sessions.allsdk.sessions.revoke("sess_xyz")Verify a session to a token
Verify whether a session with a given ID corresponds to the provided session token. Throws an error if the provided ID is invalid.
sdk.sessions.verify_token("sess_xyz", "jwt")sdk.users.allYou can also filter users by email address:
sdk.users.all(email_address: ["user1@example.com", "user2@example.com"])sdk.users.update("user_xyz", {first_name: "John"})sdk.users.delete("user_xyz")