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.api_key = "sk_example_123456789" | |
| end | |
| WorkOS.client.user_management.get_email_verification(id: "email_verification_01E4ZCR3C56J083X43JQXF3JK5") |
| from workos import WorkOSClient | |
| client = WorkOSClient(api_key="sk_example_123456789", client_id="client_123456789") | |
| client.user_management.get_email_verification( | |
| id_="email_verification_01E4ZCR3C56J083X43JQXF3JK5" | |
| ) |
| package main | |
| import ( | |
| "context" | |
| "github.com/workos/workos-go/v9" | |
| ) | |
| func main() { | |
| client := workos.NewClient("sk_example_123456789") | |
| _, err := client.UserManagement().GetEmailVerification(context.Background(), "email_verification_01E4ZCR3C56J083X43JQXF3JK5") | |
| if err != nil { | |
| panic(err) | |
| } | |
| } |
| <?php | |
| use WorkOS\WorkOS; | |
| $workos = new WorkOS( | |
| apiKey: "sk_example_123456789", | |
| clientId: "client_123456789", | |
| ); | |
| $workos | |
| ->userManagement() | |
| ->getEmailVerification(id: "email_verification_01E4ZCR3C56J083X43JQXF3JK5"); |
| import com.workos.WorkOS; | |
| WorkOS workos = new WorkOS("sk_example_123456789"); | |
| workos.userManagement.getEmailVerification( | |
| "email_verification_01E4ZCR3C56J083X43JQXF3JK5"); |
| using WorkOS; | |
| var client = new WorkOSClient(new WorkOSOptions { | |
| ApiKey = "sk_example_123456789", | |
| ClientId = "client_123456789", | |
| }); | |
| await client.UserManagement.GetEmailVerificationAsync("email_verification_01E4ZCR3C56J083X43JQXF3JK5"); |
| use workos::Client; | |
| #[tokio::main] | |
| async fn main() -> Result<(), workos::Error> { | |
| let client = Client::builder() | |
| .api_key("sk_example_123456789") | |
| .client_id("client_123456789") | |
| .build(); | |
| let _result = client | |
| .user_management() | |
| .get_email_verification("email_verification_01E4ZCR3C56J083X43JQXF3JK5") | |
| .await?; | |
| Ok(()) | |
| } |
| { | |
| "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