SEEK - Australia's no. 1 jobs, employment, career and recruitment site

Apply on your site, with SEEK
Step 1 - Authorize with the OAuth2 EndpointThis is the step that should occur when the user clicks the "Apply with SEEK" button. Clicking the button should redirect the user to our authorization endpoint (Using HTTPS GET) with the following format:
https://www.seek.com.au/api/iam/oauth2/authorize?client_id=0&redirect_uri=1&state=2&scope=3&response_type=code&advertiser_id=4
Where:
  • Client_id will be supplied to you by SEEK
  • Redirect_uri is a HTTP or HTTPS callback URI supplied by you to SEEK in advance
  • Scope is going to r_profile_apply for our purposes
  • state is a free text field where you can place anything you like. This is generally used to rehydrate a state in your own application when we redirect back to you and to protect against CSRF attacks. You should validate the state that comes back as being as you expect
  • Advertiser_id is the identifier for a single advertiser in order to display the advertiser name on the OAuth consent form (i.e. “ATS on behalf of Advertiser…”)
A C# Controller Action to generate your redirect URI might look something like below:
1
2
3
4
5
6
7
8
9
10
public ActionResult Step1_RetrieveAuthorizationCode(string clientId, string redirecUri)
    {
      const string scope = "r_profile_apply";
      const string state = "WhateverYouWantToHaveHere";
      const string authorizationUrlFormat = "https://www.seek.com.au/api/iam/oauth2/authorize?client_id={0}&redirect_uri={1}&state={2}&scope={3}&response_type=code";

      var url = string.Format(authorizationUrlFormat, clientId, HttpUtility.UrlEncode(redirecUri), state, scope);

      return Redirect(url);
    }
Once redirected to this page, the user will see the Apply on your site, with SEEK OAuth2 Authorization page. If the user is logged in, they will see the image below, otherwise they will see our login screen first.Assuming the user selects the “Allow Access” button they will then be redirected back to your original redirectUri with an authorization code added to the URL as a query string. You must extract this code from the URL to use it.For example, if your redirect URI was https://pre-provided.endpoint.com/AwSK.aspx then the redirect would look as below:
https://pre-provided.endpoint.com/AwSK.aspx?code=9995ddc0d6c846e1b6a35a2dsadas54fd5d690c064869443ce99dc47c0545fb776&state=WhateverYouWantToHaveHere
Note that the state comes back just as you sent it. You can use this to store information you may require inside your software to rehydrate your own application state. for further information please see Get an Authorization Code API call.
Step 2 - Exchange your authorization code for an access tokenNext, we need to exchange our authorization code for an access token. To do this we will submit a POST request to https://www.seek.com.au/api/iam/oauth2/token that looks as below:
POST: https://www.seek.com.au/api/iam/oauth2/tokenAuthorization: Basic Base64Encoded(client_id:client_secret)Content-Type: application/x-www-form-urlencoded{code={authorizationCode}&redirect_uri=https%3A%2F%2pre-provided.endpoint.com%2FAwSK.aspxx&grant_type=authorization_code}
The response you get from calling the /api/iam/oauth2/token endpoint should look something like:
{"access_token":"b0gfddsad55d9a518bafsdfsd8fdsf22b50dsadasdasfeaafc6b4","token_type":"bearer", "expires_in":1199}
Once you have received your access token, you can now call our prefill endpoint to receive profile information on the candidate.For futher information please see the POST Access Token Request (Authorization Code Flow) API method.
Step 3 – Call the prefilled endpoint on the application API and receive your dataNow we want to POST to the prefilled end point with this information to receive our SEEK Profile for our service. To do this, we will perform a post to https://api.seek.com.au/v2/applications/prefilled with the following format:
POST https://api.seek.com.au/v2/applications/prefilledAccept: application/jsonAuthorization: Bearer OURAUTHCODEACCESSTOKENContent-Type: application/json{ "applicationFormUrl": "https://www.mycustomapplyform.com.au/jobs/123", "advertiserId" : "1234567", "positionTitle" : "Chief Executive Officer", "positionUri" : http://www.somejobboard.biz/Job12345678, "countryCode" : "AU", "postalCode" : "2001"}
You should receive a JSON formatted object with the candidates profile information in response. It will look as below:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{
  "id":3438,
  "created":"2015-02-11T03:58:29",
  "updated":"2015-02-11T03:58:29",
  "applicantInfo":{
    "firstName":"testuser",
    "lastName":"testuser",
    "emailAddress":"sometestuser@test.com",
    "phoneNumber":"",
    "currentLocation":{
      "id":1002,
      "description":"Melbourne"
    },
    "address": {
      "addressLines": "541 St Kilda Road",
      "suburb": "St Kilda",
      "state": "VIC",
      "country": "Australia",
      "postCode": "3004"
    },
    "skills":[],
    "salaryAndVisaByCountry":{ },
    "workHistory":[
      {
        "jobTitle":"test",
        "companyName":"test",
        "achievements":"",
        "from":"2015-01-01",
        "to":"2015-02-01"
      }
    ]
  },
  "resume":{
    "link": "https://api.seek.com.au/v2/resumes/d2004ba4-4b36-e683-b950-d76fds448fa6"
  },
  "complete": "https://api.seek.com.au/v2/Applications/3438/complete"
}
For further information please see the POST Application Prefilled API Method.
Step 4 - Download the resume from the resume apiIf a resume link is present in the JSON payload you will need to download this from our Resume API. Use the same authorization header as you used on your request to https://api.seek.com.au/v2/applications/prefilled and perform a HTTP GET on the resume link. E.g:
https://api.seek.com.au/v2/resumes/d2004ba4-4b36-e683-b950-d76fds448fa6
Request
GET https://api.seek.com.au/v2/resumes/d2004ba4-4b36-e683-b950-d76fds448fa6Accept: application/octet-streamAuthorization: BearerContent-Type: application/json
Response
200 (OK)Content-Type: application/octet-streamContent-Disposition: attachment; filename=SampleResume.pdfContent-Length: 1314782binary data
For further information please see the GET Resume API method.
Step 5 – Use the data as required on your application formUse this JSON to pre-populate the form fields you need to, noting that you may also attached the downloaded resume to the application where available. When you are ready, the final step is to complete the application.
Step 6 – Call the complete endpoint on the application API to complete your applicationOnce you are done and the candidate has submitted their application to you, you simply need to send your complete signal back. To do this we use the id from the prefilled response, the current date time and a new Bearer token of type “clientcredentials” based on our clientid and client_secret. We need a new token, because we expect enough time to have elapsed between our pre-fill call and this call for our previous token to have expired.For more information on this process, see the POST Application Completed method.And that’s it, you are done.