getSsoRedirectLink
curl --request POST \
--url https://sandbox.rollfi.xyz/sso/getSsoRedirectLink \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "getSsoRedirectLink",
"email": "test_no_info4@emailsac.com",
"companyId": "82CCB239-764C-49BA-A3A8-00B9C37A59D4",
"roles": [
"w2Employee"
]
}
'import requests
url = "https://sandbox.rollfi.xyz/sso/getSsoRedirectLink"
payload = {
"method": "getSsoRedirectLink",
"email": "test_no_info4@emailsac.com",
"companyId": "82CCB239-764C-49BA-A3A8-00B9C37A59D4",
"roles": ["w2Employee"]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'getSsoRedirectLink',
email: 'test_no_info4@emailsac.com',
companyId: '82CCB239-764C-49BA-A3A8-00B9C37A59D4',
roles: ['w2Employee']
})
};
fetch('https://sandbox.rollfi.xyz/sso/getSsoRedirectLink', 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://sandbox.rollfi.xyz/sso/getSsoRedirectLink",
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([
'method' => 'getSsoRedirectLink',
'email' => 'test_no_info4@emailsac.com',
'companyId' => '82CCB239-764C-49BA-A3A8-00B9C37A59D4',
'roles' => [
'w2Employee'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://sandbox.rollfi.xyz/sso/getSsoRedirectLink"
payload := strings.NewReader("{\n \"method\": \"getSsoRedirectLink\",\n \"email\": \"test_no_info4@emailsac.com\",\n \"companyId\": \"82CCB239-764C-49BA-A3A8-00B9C37A59D4\",\n \"roles\": [\n \"w2Employee\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://sandbox.rollfi.xyz/sso/getSsoRedirectLink")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"getSsoRedirectLink\",\n \"email\": \"test_no_info4@emailsac.com\",\n \"companyId\": \"82CCB239-764C-49BA-A3A8-00B9C37A59D4\",\n \"roles\": [\n \"w2Employee\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.rollfi.xyz/sso/getSsoRedirectLink")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"getSsoRedirectLink\",\n \"email\": \"test_no_info4@emailsac.com\",\n \"companyId\": \"82CCB239-764C-49BA-A3A8-00B9C37A59D4\",\n \"roles\": [\n \"w2Employee\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"loginUrl": "https://app.sandbox.rollfi.xyz/?jwt=eyJhbGciOiJSUzI1NiJ9.eyJjb21wYW55SWQiOiI4MkNDQjIzOS03NjRDLTQ5QkEtQTNBOC0wMEI5QzM3QTU5RDQiLCJlbWFpbCI6InRlc3Rfbm9faW5mbzRAZW1haWxzYWMuY29tIiwiaWF0IjoxNzY5Nzk3NDQ3LCJleHAiOjE3Njk3OTgxMDcsIm5iZiI6MTc2OTc5NzQ0Nywicm9sZXMiOlsidzJFbXBsb3llZSJdfQ.i3YrGu63PZr6WM27dN8QW_zFG3_tTR9XMEZeq0TakvxhGWJNHx-P9eIs9Hv57oV2gWxGpL1wKBTpHZEmWxYFHq1sshNu4sD1x4pHstPSPBZls1BH1_5p5y3Smk7w0tPVe97piZV8SFH5XWVN5zU3sOazRqkLaxtiDlLy5GV1WAPNVhqia6kPOP3PNTBLg7cq6hJqW0hGqQBo_iNNKW6MHgmMNYTlEr4Ba3WdPcX-vfnBHqGDMEkvPYt8czyvdctOftgmJNUBJ8tTEJUTe0h86iRGj12PtB_8zW8wUG37RaZFtjUhCGz9dWeuxX5Uan2A0teOUpo-VObJkmsvzRxihA"
}getSsoRedirectLink
The getSsoRedirectLink API exchanges an employee or businessUser email and their company for a link that will bypass traditional login.
What it does:
- Allows a user to sign in on your system and gain access to the Rollfi UI for core payroll funcitonality
- Bypasses username, password and 2FA which are usually required for logins
Security:
- Generates a link to the Rollfi UI with a jwt containing the employee/businessUser’s information
- Signs the JWT with a securely held private key and sha256 to prevent tampering
- When directed to the link with the included jwt, the credentials and signature are verified and login is bypassed
Note:
- At this time roles are only necessary for just in time provisioning - w2Employee and contractor1099
- If you believe you may require JIT provisioning please contact support
POST
/
sso
/
getSsoRedirectLink
getSsoRedirectLink
curl --request POST \
--url https://sandbox.rollfi.xyz/sso/getSsoRedirectLink \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"method": "getSsoRedirectLink",
"email": "test_no_info4@emailsac.com",
"companyId": "82CCB239-764C-49BA-A3A8-00B9C37A59D4",
"roles": [
"w2Employee"
]
}
'import requests
url = "https://sandbox.rollfi.xyz/sso/getSsoRedirectLink"
payload = {
"method": "getSsoRedirectLink",
"email": "test_no_info4@emailsac.com",
"companyId": "82CCB239-764C-49BA-A3A8-00B9C37A59D4",
"roles": ["w2Employee"]
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
method: 'getSsoRedirectLink',
email: 'test_no_info4@emailsac.com',
companyId: '82CCB239-764C-49BA-A3A8-00B9C37A59D4',
roles: ['w2Employee']
})
};
fetch('https://sandbox.rollfi.xyz/sso/getSsoRedirectLink', 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://sandbox.rollfi.xyz/sso/getSsoRedirectLink",
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([
'method' => 'getSsoRedirectLink',
'email' => 'test_no_info4@emailsac.com',
'companyId' => '82CCB239-764C-49BA-A3A8-00B9C37A59D4',
'roles' => [
'w2Employee'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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://sandbox.rollfi.xyz/sso/getSsoRedirectLink"
payload := strings.NewReader("{\n \"method\": \"getSsoRedirectLink\",\n \"email\": \"test_no_info4@emailsac.com\",\n \"companyId\": \"82CCB239-764C-49BA-A3A8-00B9C37A59D4\",\n \"roles\": [\n \"w2Employee\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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://sandbox.rollfi.xyz/sso/getSsoRedirectLink")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"method\": \"getSsoRedirectLink\",\n \"email\": \"test_no_info4@emailsac.com\",\n \"companyId\": \"82CCB239-764C-49BA-A3A8-00B9C37A59D4\",\n \"roles\": [\n \"w2Employee\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.rollfi.xyz/sso/getSsoRedirectLink")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"method\": \"getSsoRedirectLink\",\n \"email\": \"test_no_info4@emailsac.com\",\n \"companyId\": \"82CCB239-764C-49BA-A3A8-00B9C37A59D4\",\n \"roles\": [\n \"w2Employee\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"loginUrl": "https://app.sandbox.rollfi.xyz/?jwt=eyJhbGciOiJSUzI1NiJ9.eyJjb21wYW55SWQiOiI4MkNDQjIzOS03NjRDLTQ5QkEtQTNBOC0wMEI5QzM3QTU5RDQiLCJlbWFpbCI6InRlc3Rfbm9faW5mbzRAZW1haWxzYWMuY29tIiwiaWF0IjoxNzY5Nzk3NDQ3LCJleHAiOjE3Njk3OTgxMDcsIm5iZiI6MTc2OTc5NzQ0Nywicm9sZXMiOlsidzJFbXBsb3llZSJdfQ.i3YrGu63PZr6WM27dN8QW_zFG3_tTR9XMEZeq0TakvxhGWJNHx-P9eIs9Hv57oV2gWxGpL1wKBTpHZEmWxYFHq1sshNu4sD1x4pHstPSPBZls1BH1_5p5y3Smk7w0tPVe97piZV8SFH5XWVN5zU3sOazRqkLaxtiDlLy5GV1WAPNVhqia6kPOP3PNTBLg7cq6hJqW0hGqQBo_iNNKW6MHgmMNYTlEr4Ba3WdPcX-vfnBHqGDMEkvPYt8czyvdctOftgmJNUBJ8tTEJUTe0h86iRGj12PtB_8zW8wUG37RaZFtjUhCGz9dWeuxX5Uan2A0teOUpo-VObJkmsvzRxihA"
}Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
Response
200 - application/json
The response is of type object.
⌘I
