**若需要建立新的一組 API 金鑰,請聯絡 contact@teamdoor.io
※API整合串接功能為專業方案以上能使用的進階功能,更多的方案介紹請見 價格方案與每個方案的差別
文件位置
https://docs.teamdoor.io/api/index.html
Teamdoor 公司資料
連至 https://app.teamdoor.io 登入(或註冊)
登入後可以自行邀請其他成員進行 teamdoor 職缺新增修改之操作
API 格式
目前提供以下兩個 endpoint ,可以分別在各自的區塊下看到相關的 request 與 response 格式
POST <https://api.teamdoor.io/oauth/token
>GET <https://api.teamdoor.io/v1/jobs
>
測試
-
先點下 POST /oauth/token 的
try it out
-
在 request body 中填入正確的 client_id / client_secret 後,點擊下方 Execute
-
執行成功後應會有 Response 畫面如下,複製 Response body 中的
access_token
值 -
回到頁面最上方,點擊右側 『Authorize』 按鈕
-
填入先前複製之 access token 並且點擊 『Authorize』按鈕關閉彈出式視窗
-
往下捲動至 /v1/jobs 區域,在 GET /v1/jobs 右側應該會看到鎖頭上鎖
-
點擊此區域的 Execute,若
access_token
正確無誤則會回傳職缺列表 -
若
access_token
有誤或是過期(目前設定為兩天),則回到第一步驟重新取得並使用新的 token
基本操作流程
API Request 遵照 Oauth2 定義的 client credentials flow(上圖),各步驟執行動作如下:
-
用以下格式發送網路請求至
https://api.teamdoor.io/oauth/token
這個 endpoint,取得 access tokenRequest Body
{ "grant_type": "client_credentials", "client_id": "${client_id}", "client_secret": "${client_secret}" }
-
Teamdoor 主機驗證 id/secret 並產生 access token
-
回傳 access token
Response
{ "access_token": "082xP_aTtG2v3-LmxwnwMEmBBPZjMVelgq9CgVT6QXA", "token_type": "Bearer", "expires_in": 7200, "created_at": 1619075887 }
-
以 access token 發送請求至
https://api.teamdoor.io/v1/jobs
CURL Request
curl -X GET "<https://api.teamdoor.io/v1/jobs>" -H "accept: application/json" -H "Authorization: Bearer ${access token}"
-
Teamdoor 主機回傳職缺資訊
Response
{ "jobs": [ { "id": "6dce3453-bc5b-4a20-a124-99cfd5334c07", "company": "Example Co, Ltd.", "companyLogo": "<https://assets.teamdoor.io/assets/yourator-logo-a9f5641040cda277f18e27e607c3d3ff458eb389b6350f3bae435b69fa9e3a67.png>", "companyUrl": "<https://example.teamdoor.io/>", "title": "Frontend Developer", "requiredQualifications": "<p>Knowledge of REACT tools including React.js, Webpack, Enzyme, Redux, and Flux.</p>", "preferredQualifications": "<p>Experience with node and react.</p>", "benefits": "<p>Free Lunch and Dinner</p>", "salaryType": "annual_salary", "salaryUpperBound": 80000, "salaryLowerBound": 40000, "city": "Taipei City", "country": "Taiwan", "responsibility": "<p>Meeting with the development team to discuss user interface ideas and applications.</p>\\n", "createdAt": "2020-09-24T03:57:01.000Z", "updatedAt": "2021-02-08T08:08:52.000Z", "jobType": "full_time", "category": "Administrative", "currency": "usd", "defaultUrl": "<https://example.teamdoor.io/s/974AEB>" } ] }