Resend Email Verification
When a user needs to verify their account, an email is sent to them containing a verification link. Clicking on this link will automatically verify the user's email address and activate their account. This process ensures that the user’s email is valid and that their account remains secure. The verification link has a limited time validity, so it’s essential for users to complete the verification within the given time frame.
Endpoint
To resend the email verification link to the user, make a POST
request to the following endpoint:
https://api.betatel.com/api/auth/verify-email/resend
Request Headers
The request must include an Authorization header with a valid JWT token for authentication:
Header | Value | Required | Description |
---|---|---|---|
Authorization | {{access_token}} | Yes | The authentication token to verify the user's identity |
Request Body
Your request should contain the email for the user:
{
"email": "povid681@nokdot.com",
}
Param | Value | Type | Required | Description |
---|---|---|---|---|
povid681@nokdot.com | String | Yes | The user's email |
Let’s Dive Into the Code!
Choose your preferred programming language and use the provided examples to integrate the login
- cUrl
- Python
- Node.js
- PHP
- Java
- C#
curl --location 'https://api.betatel.com/api/auth/verify-email/resend' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZWE2MjJiMDU1MjkzNWZhYzVjZDFhZCIsImVtYWlsIjoicG92aWQ2ODFAbm9rZG90LmNvbSIsInJvbGUiOiJ1c2VyIiwiaWF0IjoxNzQzNDI0MjAzLCJleHAiOjE3NDM0Mjc4MDN9._-O4UTMwYTRxKPlht4h1ktMS60UjQEuFCmNbLnY4K-0' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "povid681@nokdot.com"
}'
import http.client
import json
conn = http.client.HTTPSConnection("api.betatel.com")
payload = json.dumps({
"email": "povid681@nokdot.com"
})
headers = {
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZWE2MjJiMDU1MjkzNWZhYzVjZDFhZCIsImVtYWlsIjoicG92aWQ2ODFAbm9rZG90LmNvbSIsInJvbGUiOiJ1c2VyIiwiaWF0IjoxNzQzNDI0MjAzLCJleHAiOjE3NDM0Mjc4MDN9._-O4UTMwYTRxKPlht4h1ktMS60UjQEuFCmNbLnY4K-0',
'Content-Type': 'application/json'
}
conn.request("POST", "/api/auth/verify-email/resend", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
const axios = require('axios');
let data = JSON.stringify({
"email": "povid681@nokdot.com"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api.betatel.com/api/auth/verify-email/resend',
headers: {
'Authorization': 'Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZWE2MjJiMDU1MjkzNWZhYzVjZDFhZCIsImVtYWlsIjoicG92aWQ2ODFAbm9rZG90LmNvbSIsInJvbGUiOiJ1c2VyIiwiaWF0IjoxNzQzNDI0MjAzLCJleHAiOjE3NDM0Mjc4MDN9._-O4UTMwYTRxKPlht4h1ktMS60UjQEuFCmNbLnY4K-0',
'Content-Type': 'application/json'
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://api.betatel.com/api/auth/verify-email/resend',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"email": "povid681@nokdot.com"
}',
CURLOPT_HTTPHEADER => array(
'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZWE2MjJiMDU1MjkzNWZhYzVjZDFhZCIsImVtYWlsIjoicG92aWQ2ODFAbm9rZG90LmNvbSIsInJvbGUiOiJ1c2VyIiwiaWF0IjoxNzQzNDI0MjAzLCJleHAiOjE3NDM0Mjc4MDN9._-O4UTMwYTRxKPlht4h1ktMS60UjQEuFCmNbLnY4K-0',
'Content-Type: application/json'
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Unirest.setTimeouts(0, 0);
HttpResponse<String> response = Unirest.post("https://api.betatel.com/api/auth/verify-email/resend")
.header("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZWE2MjJiMDU1MjkzNWZhYzVjZDFhZCIsImVtYWlsIjoicG92aWQ2ODFAbm9rZG90LmNvbSIsInJvbGUiOiJ1c2VyIiwiaWF0IjoxNzQzNDI0MjAzLCJleHAiOjE3NDM0Mjc4MDN9._-O4UTMwYTRxKPlht4h1ktMS60UjQEuFCmNbLnY4K-0")
.header("Content-Type", "application/json")
.body("{\r\n \"email\": \"povid681@nokdot.com\"\r\n}")
.asString();
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://api.betatel.com/api/auth/verify-email/resend");
request.Headers.Add("Authorization", "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6IjY3ZWE2MjJiMDU1MjkzNWZhYzVjZDFhZCIsImVtYWlsIjoicG92aWQ2ODFAbm9rZG90LmNvbSIsInJvbGUiOiJ1c2VyIiwiaWF0IjoxNzQzNDI0MjAzLCJleHAiOjE3NDM0Mjc4MDN9._-O4UTMwYTRxKPlht4h1ktMS60UjQEuFCmNbLnY4K-0");
var content = new StringContent("{\r\n \"email\": \"povid681@nokdot.com\"\r\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Response
JSON Schema:
{
"message": "Verification email sent successfully"
}
🎉 Success – The Email Has Been Resent!
🔜 What’s Next? The user has now been sent a new verification email. You can proceed with other user management functionalities such as handling login sessions, or securing the account with a password reset.