Abstractions
Privy offers several level of abstractions through SDKs to simplify the implementation of request signing. In order of highest-level to lowest-level, these abstractions are automatic signing, utility functions, and direct implementation.Automatic signing
With automatic signing, Privy SDKs automatically handles producing signatures when making requests to the Privy API. This means your application does not directly need to handle any signing logic.Learn how to use automatic
signing in your
application.
Utility functions
If your application is unable to use automatic signing as part of Privy’s SDKs, Privy’s SDKs also offer utility functions for signature payload preparation and in-line signing. Using utility functions over automatic signing may be preferred if your authorization keys are secured in a separate service (e.g. KMS) and signing can only be executed within that service.Learn how to use these utility
functions in your application.
- Formatting requests for authorization signatures. This accepts a request you intend to make to the Privy API and constructs the required payload for signing.
- Generating authorization signatures. Given a formatted signature payload, this method accepts the private key for an authorization key or an authorization context generally and produces the corresponding signature over the payload.
- Construct your request payload
- Use the Privy SDK’s formatting requests function to generate your signature payload
- Make a call out to your external signing service to sign the payload from step (2)
- Include the signature in a
privy-authorization-signatureheader for the request.
Direct implementation
Learn how to implement direct
signing in your
application.

