Webhooks
Get Account Secret
Retrieve the current account webhook secret.
Endpoint: (GET) https://api.lusha.com/api/account/secret
GET
/
api
/
account
/
secret
Get Account Secret
curl --request GET \
--url https://api.lusha.com/api/account/secret \
--header 'api_key: <api-key>'import requests
url = "https://api.lusha.com/api/account/secret"
headers = {"api_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>'}};
fetch('https://api.lusha.com/api/account/secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.lusha.com/api/account/secret")
.header("api_key", "<api-key>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lusha.com/api/account/secret"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api_key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"secret": "whsec_abc123def456ghi789jkl012mno345pqr678stu901vwx234yz"
}{
"statusCode": 401,
"message": "Invalid API key"
}{
"statusCode": 404,
"message": "Account secret not found. Please generate one first."
}{
"statusCode": 500,
"message": "Internal server error. Please try again later."
}Authorizations
Your Lusha API key. You can find this in your Lusha dashboard under API settings.
Include this key in the api_key header for all requests.
Response
Account secret retrieved successfully
Current account webhook secret
Example:
"whsec_abc123def456ghi789jkl012mno345pqr678stu901vwx234yz"
Was this page helpful?
⌘I
Get Account Secret
curl --request GET \
--url https://api.lusha.com/api/account/secret \
--header 'api_key: <api-key>'import requests
url = "https://api.lusha.com/api/account/secret"
headers = {"api_key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {api_key: '<api-key>'}};
fetch('https://api.lusha.com/api/account/secret', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));HttpResponse<String> response = Unirest.get("https://api.lusha.com/api/account/secret")
.header("api_key", "<api-key>")
.asString();package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.lusha.com/api/account/secret"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("api_key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"secret": "whsec_abc123def456ghi789jkl012mno345pqr678stu901vwx234yz"
}{
"statusCode": 401,
"message": "Invalid API key"
}{
"statusCode": 404,
"message": "Account secret not found. Please generate one first."
}{
"statusCode": 500,
"message": "Internal server error. Please try again later."
}