Symptom
An error occurs when attempting to post Time Events using the bulk REST API https://<API-Server-URL>/rest/timemanagement/timeeventprocessing/v1/TimeEvents
The following error is received:
{ "errors": [ "Invalid User" ], "message": "The user XXXX is not allowed to call the API.", "status": "401 UNAUTHORIZED"}
Environment
- SAP successfactors HCM core
- SAP successfactors Time Tracking - Clock In Clock Out
Reproducing the Issue
- obtain API key and Private key
- create OAuth token for authorization
- call REST API for create Time events with generated Oauth token
- upon executing, error is received
Cause
Incorrect user is maintained in the OAuth2 application.
Resolution
When using the bulk REST API for sending time events from the terminal to Clock In Clock Out, only the technical user is allowed for setting this up.
TECHNICAL_USER_CICOTERMINAL_9D3F8AC1
For further details, you can review the below implementation guide
Integrating SAP SuccessFactors Clock In Clock Out with External Time Tracking Services - Integration Overview
See Also
KBA 3146142 How to import terminal Time Events via REST API for SAP SuccessFactors Time Tracking Clock In Clock Out
Keywords
API, technical, rest, CICO, time, event, events, import, integrate, upload, mass, clock, time, punch, in, out, terminal, ttr, time event, post, 401, authorization error , KBA , LOD-SF-TTR-CIO , Clock In/ Clock Out , Problem
SAP Knowledge Base Article - Public