Email verification is a security feature that requires users to verify their email address before they can sign in to your application. It is enabled by default.
Users signing in with Magic Auth, Google OAuth, Apple OAuth, or SSO are automatically verified. For other authentication methods, an email verification flow is required to confirm that the user’s email address belongs to them.
Get the details of an existing email verification code that can be used to send an email to a user for verification.
curl "https://api.workos.com/user_management/email_verification/email_verification_01E4ZCR3C56J083X43JQXF3JK5" \ --header "Authorization: Bearer sk_example_123456789"
{ "object": "email_verification", "id": "email_verification_01E4ZCR3C56J083X43JQXF3JK5", "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5", "email": "marcelina.davis@example.com", "expires_at": "2026-01-15T12:00:00.000Z", "created_at": "2026-01-15T12:00:00.000Z", "updated_at": "2026-01-15T12:00:00.000Z", "code": "123456" }
| curl "https://api.workos.com/user_management/email_verification/email_verification_01E4ZCR3C56J083X43JQXF3JK5" \ | |
| --header "Authorization: Bearer sk_example_123456789" |
| import { WorkOS } from '@workos-inc/node'; | |
| const workos = new WorkOS('sk_example_123456789'); | |
| const emailVerification = await workos.userManagement.getEmailVerification( | |
| 'email_verification_01HYGGEB6FYMWQNWF3XDZG7VV3', | |
| ); |
| require "workos" | |
| WorkOS.configure do |config| | |
| config.key = "sk_example_123456789" | |
| end | |
| email_verification = WorkOS::UserManagement.get_email_verification( | |
| id: "email_verification_01HYGGEB6FYMWQNWF3XDZG7VV3" | |
| ) |
| from workos import WorkOSClient | |
| workos_client = WorkOSClient( | |
| api_key="sk_example_123456789", client_id="client_123456789" | |
| ) | |
| email_verification = workos_client.user_management.get_email_verification( | |
| email_verification_id="email_verification_01HYGGEB6FYMWQNWF3XDZG7VV3" | |
| ) |
| package main | |
| import ( | |
| "context" | |
| "github.com/workos/workos-go/v2/pkg/usermanagement" | |
| ) | |
| func main() { | |
| usermanagement.SetAPIKey( | |
| "sk_example_123456789", | |
| ) | |
| response, err := usermanagement.GetEmailVerification( | |
| context.Background(), | |
| usermanagement.GetEmailVerificationOpts{ | |
| MagicAuth: "email_verification_01HYGGEB6FYMWQNWF3XDZG7VV3", | |
| }, | |
| ) | |
| } |
| <?php | |
| WorkOS\WorkOS::setApiKey("sk_example_123456789"); | |
| $userManagement = new WorkOS\UserManagement(); | |
| $emailVerification = $userManagement->getEmailVerification( | |
| "email_verification_01HYGGEB6FYMWQNWF3XDZG7VV3" | |
| ); |
| import com.workos.WorkOS; | |
| import com.workos.usermanagement.models.EmailVerification; | |
| WorkOS workos = new WorkOS("sk_example_123456789"); | |
| EmailVerification emailVerification = workos.userManagement.getEmailVerification( | |
| "email_verification_01HYGGEB6FYMWQNWF3XDZG7VV3"); |
| { | |
| "object": "email_verification", | |
| "id": "email_verification_01E4ZCR3C56J083X43JQXF3JK5", | |
| "user_id": "user_01E4ZCR3C56J083X43JQXF3JK5", | |
| "email": "marcelina.davis@example.com", | |
| "expires_at": "2026-01-15T12:00:00.000Z", | |
| "created_at": "2026-01-15T12:00:00.000Z", | |
| "updated_at": "2026-01-15T12:00:00.000Z", | |
| "code": "123456" | |
| } |
GET/user_management /email_verification /:idParameters Returns