Skip to content

Retrieve Job Details Magic Link

Resource representing a Magic Link for Job details.

The Magic Link resource generates a link to send a user directly to the job details page in the client portal. This will allow you to link to the job without requiring the user to login to the client portal.

Magic Links are only valid for 5 minutes and the Magic Link sessions are only valid for 24 hours.

The job must be submitted to generate the Magic Link.

Note

If embedding the Job Details page with an iframe and you plan for users to make use of Video Calling features, it is important that you give microphone and/or camera access to the iframe.

Example
<iframe allow="camera;microphone"></iframe>

Endpoints

MethodUrl
POST/v1.0/magic-link

Request Parameters

user_id
•
guid

The user ID this magic link is being generated for.

email
•
string

The email this magic link is being generated for. A new email will result in a new member being created.

Note

Only an email or user_id is required, not both.

hide_navbar
•
boolean

Determines the visibility of the navigation bar.

portal_view
•
portal_view
required

Allows you to specify the portal view for the magic link that is going to be generated. See details below.

return_options
•
return_options

Allow you to specify details of where to return the user after they have completed actions in the client portal. This affects the portal's back button as well as the session expired page. See details below.

allowed_legend_ids
•
array

Allows you to specify a list of legend IDs that the user can create jobs from. Omitting this field will result in the user being able to create jobs from all legends that are enabled for job creation.


Portal View

type
•
string
required

The portal view type.

  • job_details - The portal view type to generate a Magic Link for the job details page.
Note

When the job is under construction and the given user ID has permission to create jobs, it redirects to the onboarding page and the hide_navbar is ignored.

job_id
•
guid
required

The job's ID.


Return Options

url
•
string
required

The URL to return the user to.

action_label
•
string

The label to display on the back button.



Sample Request

bash
Copied
1curl -X POST 'https://api.worklayer.com/v1.0/magic-link' \
2-H 'Authorization: Bearer {token}'
3-d '{ "user_id": "user_id_guid", "hide_navbar": true, "portal_view": { "type": "job_details", "job_id": "job_id_guid" }, "allowed_legend_ids": ["legend_id"] }'

Response

url
•
string

The Magic Link's URL.

Sample Response

json
Copied
1{
2 "url": "https://domain/__session/{payload}?s={signature}"
3}
Last updated on September 10, 2024