Overview
Turnkey’s Flutter SDK 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 in your Flutter app.The underlying client
To make advanced API requests, use theclient retrieved from the TurnkeyProvider.
This client is tied to the active session, so stamping, authentication, 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 client.
Here’s how you can use the client to make a signRawPayload request to Turnkey:
lib/widgets/sign_raw_payload_button.dart
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 theclient, you can view all the metadata of the activity you are performing.
This includes the activity ID, status, and more.
Stamping with a passkey
You can create a client that uses a passkey for stamping instead of using securely stored api keys. Use thecreatePasskeyClient method from the TurnkeyProvider to create a new client instance configured for passkey stamping.
An rpId is required to use passkey stamping; you can either pass it directly when creating the client or set it in the TurnkeyProvider config.