Zeal Components
Generate Employee or Contractor Dashboard Link
Generate a link that automatically signs in an employee or contractor and redirects them to their Zeal worker dashboard. This link expires exactly 7 days after generation.
POST
/
getAuthLink
Generate Employee or Contractor Dashboard Link
curl --request POST \
--url https://api.zeal.com/getAuthLink \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"partnerID": "c133ecdere9b3445a2f22Cc258b23445a",
"companyID": "fc235f012bae46222ca3444cc2215bcfa",
"employeeID": "507f1f77bcf86cd799439011",
"embedded_page": "dashboard-worker",
"use_mfa": true,
"mfa_methods": [
"email"
]
}
'import requests
url = "https://api.zeal.com/getAuthLink"
payload = {
"partnerID": "c133ecdere9b3445a2f22Cc258b23445a",
"companyID": "fc235f012bae46222ca3444cc2215bcfa",
"employeeID": "507f1f77bcf86cd799439011",
"embedded_page": "dashboard-worker",
"use_mfa": True,
"mfa_methods": ["email"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
partnerID: 'c133ecdere9b3445a2f22Cc258b23445a',
companyID: 'fc235f012bae46222ca3444cc2215bcfa',
employeeID: '507f1f77bcf86cd799439011',
embedded_page: 'dashboard-worker',
use_mfa: true,
mfa_methods: ['email']
})
};
fetch('https://api.zeal.com/getAuthLink', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zeal.com/getAuthLink",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'partnerID' => 'c133ecdere9b3445a2f22Cc258b23445a',
'companyID' => 'fc235f012bae46222ca3444cc2215bcfa',
'employeeID' => '507f1f77bcf86cd799439011',
'embedded_page' => 'dashboard-worker',
'use_mfa' => true,
'mfa_methods' => [
'email'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zeal.com/getAuthLink"
payload := strings.NewReader("{\n \"partnerID\": \"c133ecdere9b3445a2f22Cc258b23445a\",\n \"companyID\": \"fc235f012bae46222ca3444cc2215bcfa\",\n \"employeeID\": \"507f1f77bcf86cd799439011\",\n \"embedded_page\": \"dashboard-worker\",\n \"use_mfa\": true,\n \"mfa_methods\": [\n \"email\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.zeal.com/getAuthLink")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"partnerID\": \"c133ecdere9b3445a2f22Cc258b23445a\",\n \"companyID\": \"fc235f012bae46222ca3444cc2215bcfa\",\n \"employeeID\": \"507f1f77bcf86cd799439011\",\n \"embedded_page\": \"dashboard-worker\",\n \"use_mfa\": true,\n \"mfa_methods\": [\n \"email\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/getAuthLink")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"partnerID\": \"c133ecdere9b3445a2f22Cc258b23445a\",\n \"companyID\": \"fc235f012bae46222ca3444cc2215bcfa\",\n \"employeeID\": \"507f1f77bcf86cd799439011\",\n \"embedded_page\": \"dashboard-worker\",\n \"use_mfa\": true,\n \"mfa_methods\": [\n \"email\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"url": "https://payroll.your-domain.com/auth?accessToken=<accessToken>"
}{
"success": false,
"errors": [
{
"message": "No Partner with this partnerID exists",
"code": 13
}
]
}Generate a link that automatically signs in an employee or contractor and redirects them to their Zeal worker dashboard. This link (and dashboard) can be hosted on your custom domain. When a worker logs out of the dashboard, they will be redirected to the Base URL from your Settings page. This link expires exactly 7 days after generation.
This endpoint shares the
/getAuthLink route with Generate Company Login Link. Pass employeeID or contractorID (not both required, but at least one) to generate a worker dashboard link.For worker links, embedded_page must be one of dashboard-worker, profile-worker, or wallet (not the company dashboard values). Optional use_mfa and mfa_methods apply only to worker links.Authorizations
Body
application/json
PartnerID of the Zeal Partner
CompanyID of the company
ID of the employee to sign in
ID of the contractor to sign in
By specifying the particular page you want to embed, the embedded component will show just that page and no sidebar. Can take the values of dashboard-worker (worker dashboard home page), profile-worker (worker profile page), or wallet (worker instant pay wallet).
Available options:
dashboard-worker, profile-worker, wallet If true, MFA is required when accessing the worker dashboard
If not specified and use_mfa is true, both MFA options are shown
Available options:
email, sms ⌘I
Generate Employee or Contractor Dashboard Link
curl --request POST \
--url https://api.zeal.com/getAuthLink \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"partnerID": "c133ecdere9b3445a2f22Cc258b23445a",
"companyID": "fc235f012bae46222ca3444cc2215bcfa",
"employeeID": "507f1f77bcf86cd799439011",
"embedded_page": "dashboard-worker",
"use_mfa": true,
"mfa_methods": [
"email"
]
}
'import requests
url = "https://api.zeal.com/getAuthLink"
payload = {
"partnerID": "c133ecdere9b3445a2f22Cc258b23445a",
"companyID": "fc235f012bae46222ca3444cc2215bcfa",
"employeeID": "507f1f77bcf86cd799439011",
"embedded_page": "dashboard-worker",
"use_mfa": True,
"mfa_methods": ["email"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
partnerID: 'c133ecdere9b3445a2f22Cc258b23445a',
companyID: 'fc235f012bae46222ca3444cc2215bcfa',
employeeID: '507f1f77bcf86cd799439011',
embedded_page: 'dashboard-worker',
use_mfa: true,
mfa_methods: ['email']
})
};
fetch('https://api.zeal.com/getAuthLink', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zeal.com/getAuthLink",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'partnerID' => 'c133ecdere9b3445a2f22Cc258b23445a',
'companyID' => 'fc235f012bae46222ca3444cc2215bcfa',
'employeeID' => '507f1f77bcf86cd799439011',
'embedded_page' => 'dashboard-worker',
'use_mfa' => true,
'mfa_methods' => [
'email'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.zeal.com/getAuthLink"
payload := strings.NewReader("{\n \"partnerID\": \"c133ecdere9b3445a2f22Cc258b23445a\",\n \"companyID\": \"fc235f012bae46222ca3444cc2215bcfa\",\n \"employeeID\": \"507f1f77bcf86cd799439011\",\n \"embedded_page\": \"dashboard-worker\",\n \"use_mfa\": true,\n \"mfa_methods\": [\n \"email\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.zeal.com/getAuthLink")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"partnerID\": \"c133ecdere9b3445a2f22Cc258b23445a\",\n \"companyID\": \"fc235f012bae46222ca3444cc2215bcfa\",\n \"employeeID\": \"507f1f77bcf86cd799439011\",\n \"embedded_page\": \"dashboard-worker\",\n \"use_mfa\": true,\n \"mfa_methods\": [\n \"email\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zeal.com/getAuthLink")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"partnerID\": \"c133ecdere9b3445a2f22Cc258b23445a\",\n \"companyID\": \"fc235f012bae46222ca3444cc2215bcfa\",\n \"employeeID\": \"507f1f77bcf86cd799439011\",\n \"embedded_page\": \"dashboard-worker\",\n \"use_mfa\": true,\n \"mfa_methods\": [\n \"email\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"url": "https://payroll.your-domain.com/auth?accessToken=<accessToken>"
}{
"success": false,
"errors": [
{
"message": "No Partner with this partnerID exists",
"code": 13
}
]
}