Apply with certo in redirect mode
For in-app browsers and native apps that cannot open a popup. certo opens in the same tab and returns to your registered address with the application's id and your state.
2 minute read
Some places cannot open a popup: the browser inside a social app, a native app's web view. Redirect mode opens certo in the same tab instead and, after Apply, sends the candidate back to an address you registered, with the application's id and your state in it. Never the content: your server reads it through the API, so redirect mode needs delivery to your server.
1. Register the return address
Under Integrations, Apply with certo, Where it runs, add a Return address (redirect), for example https://jobs.hireline.example/certo/return: https on a host name (http only on localhost), a path and a query if you like, no fragment. It is matched exactly. On one of your checked domains it is live at once; anywhere else certo reviews it first, as a site.
2. Send the candidate there
With the script, on the button:
<button data-certo-apply="ao_6f1c2b8e4d7a49f0a3e5c1d2b9f8e7a6"
data-mode="redirect"
data-redirect-uri="https://jobs.hireline.example/certo/return"
data-job-ref="JOB-42"
data-state="st-9d1e5c7a2b"></button>
Or CertoApply.open({ id, mode: 'redirect', redirectUri, state, ... }). Without the script, a plain link does the same:
https://certo.bio/apply/ao_6f1c2b8e4d7a49f0a3e5c1d2b9f8e7a6?mode=redirect&redirect_uri=https%3A%2F%2Fjobs.hireline.example%2Fcerto%2Freturn&state=st-9d1e5c7a2b&job_ref=JOB-42
Encode every value. job_ref, job_title, hiring_company and job_url carry the job's words, as the button's attributes do; with an apply session (as_) they and the state come from the session instead.
3. Take the candidate back
After Apply, certo sends the tab to your address with two parameters added (any query you registered is kept):
https://jobs.hireline.example/certo/return?application_id=3f6b1a52-8c4d-4e9f-a1b2-c3d4e5f60718&state=st-9d1e5c7a2b
On that page, on your server:
- Compare
statewith the value you kept in the visitor's session. Different or missing: do not attach the application to this visitor. - Read the application with
GET /v1/applications/{application_id}(server side) and check itsstatetoo: the address bar is the visitor's to edit, the API's answer is certo's. - Show the candidate it worked.
The webhook's application.submitted arrives as well; handle the application once, by its id.
A return address that is not registered exactly answers apply.redirect_not_allowed before anything is shown.