Skip to main content

Overview

The Embedded Wallet Kit provides a wide variety of helper functions to abstract interactions with Turnkey’s infrastructure. However, you can also make advanced API requests directly to Turnkey’s endpoints if you need more control or want to implement custom features.

The HTTP client

To make advanced API requests, you can use the httpClient provided by the useTurnkey hook. This client is tied to the active session meaning stamping and organization context are automatically handled for you. You can see the API Reference for a complete list of available API endpoints and their parameters. All of these can be accessed through the httpClient. Here’s how you can use the httpClient to make a signRawPayload request to Turnkey:

Viewing the activity

When creating, modifying, or using resources within Turnkey, an activity is created. You can learn more about activities in the Activities section. If you use the httpClient, you can view all the metadata of the activity you are performing. This includes the activity ID, votes list, status, and more.

Using other stampers

By default, the httpClient will use a securely stored API key to stamp requests to Turnkey. You can switch this to use a passkey or external wallet by passing in a StamperType to the httpClient functions. The user will be prompted to sign using the selected method before the request is made. For example, to use a passkey to stamp the signRawPayload request, simply pass in StamperType.Passkey as the second argument: