Home Account How to connect your HR system with an OAuth client

How to connect your HR system with an OAuth client

Last updated on Nov 13, 2026

For an HR connection that asks for Client ID and Client secret, an OAuth client is required to synchronize employee data and portraits and manage real-time updates. An API key alone no longer supports employee synchronization. You can connect without an API key, but absences, cost centers, expenses and purchases stay off.

Where to find it

Open your HR connection card in Travel Code. For an existing connection, click Add an OAuth client if shown, or choose Change the OAuth client or API key from the connection menu.

How to set up the OAuth client

  1. Enter your HR account address in Account address.
  2. Ask your HR-system administrator to open the administration area and its integration keys page.
  3. Create an OAuth client named Travel Code.
  4. Give it the read permissions listed in the connection form's OAuth setup guide. These cover employee and organization data; legal-entities.readonly is required to connect.
  5. Include the permissions for real-time updates:
    • Webhook endpoints: read and write (webhook-endpoints.readwrite).
    • Employees: read (employees.readonly).
    • Employments: read (employments.readonly).
    • Job positions: read (job-positions.readonly).
    • Employee attributes: read (employee-attributes.readonly).
  6. In Travel Code, fill in Client ID and Client secret.
  7. If you need absences, cost centers, expenses or purchases, expand Optional: API key for absences, cost centers, expenses and purchases and enter an API key. Your administrator creates the key on the same integration keys page.
  8. Submit the connection form. Travel Code checks the OAuth client and any supplied API key before saving.
  9. To enable real-time updates, click Turn on real-time updates, or Try real-time updates again if a previous attempt failed.

Good to know

  • Employee data and portraits use the OAuth client. Portraits use the employees.readonly permission.
  • Without an API key, absences and cost centers are skipped. Expense and purchase write-back cannot be switched on.
  • Existing connections with only an API key need an OAuth client before employee synchronization can continue.
  • Connecting again replaces the OAuth client. Leave API key empty to keep a stored key; enter a new key to replace it.
  • The client secret and API key are stored encrypted and never shown again.
  • With real-time updates enabled, changes arrive within minutes. A full check still runs every night.
  • When real-time updates are off and an OAuth client is already stored, you can retry without entering its credentials again.
  • For an older connection that asks for credentials through Turn on real-time updates, those credentials are saved only after the HR system accepts the webhook subscription. If that subscription fails, the previous credentials are kept.

FAQ

Can I keep synchronizing employees with only an API key?

No. An HR connection that asks for an OAuth client needs its ID and secret for employee synchronization, including nightly synchronization. Open the connection card and click Add an OAuth client, or choose Change the OAuth client or API key.

Do I need an API key as well as an OAuth client?

An OAuth client is enough for employee data, portraits and real-time updates. An API key is also needed for absences, cost centers, expenses and purchases. Without a key, those modules stay off and expense and purchase write-back cannot be switched on.

What if the OAuth client does not have all the permissions?

If a required permission is missing, the connection error names it, for example legal-entities.readonly. Ask your HR-system administrator to add it and try again. Optional resources without access are skipped; real-time updates also require the webhook and resource permissions listed in the setup instructions.

How do I change the OAuth client without losing my API key?

Choose Change the OAuth client or API key in the connection menu and enter the new Client ID and Client secret. Leave API key empty to keep the stored key. Travel Code checks the supplied credentials before saving.

Does adding an OAuth client automatically enable real-time updates?

No. After connecting, use Turn on real-time updates, or Try real-time updates again after a failed attempt. Give the OAuth client the real-time permissions during initial setup so you do not need to return to the HR system to add them.


Still have questions? Message us in the support chat or at support@travel-code.com.