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.new
Allowlist identifiers
The following methods are available for managing allowlist identifiers.
Retrieve the list of allowlist identifiers
sdk.allowlist_identifiers.all
Add 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.all
sdk.clients.verify_token("jwt")
sdk.sessions.find("sess_xyz")
sdk.sessions.all
sdk.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.all
You 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")
Feedback
Last updated on