I'm trying to use the Workday REST API to fetch & update some workers data. I'm having some difficulties to authenticate to it and the documentation is very poor on information to exploit the API.
I've followed this link, which give guidelines to create OAuth app inside Workday which is a pretty common thing for API authentication.
As I already have an ISU working, I've created an "API Client for Integrations" giving me an Client ID & secret.
The issue is that I manage to get an access_token using these information. Usually this CURL request should work to get my token :
curl --location '{OAUTH_URL}/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--header 'Authorization: Basic {base64(CLIENT_ID:CLIENT_SECRET)}' \
--data-urlencode 'grant_type=client_credentials'
But this returns :
{
"error": "Invalid request"
}
Does anyone have any idea of to achieve this ?
Thank you !
EDIT :
I've found a way to generate an access_token using API client for Integrations :
curl --location --request POST 'https://{BASE_URL}/ccx/oauth2/{TENANT}/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'grant_type=refresh_token' \
--data-urlencode 'client_id=xxx' \
--data-urlencode 'client_secret=xxx' \
--data-urlencode 'refresh_token=xxx'
But I cannot find a way to interact with Workday such as Person API. I'm always getting an error when trying to get /people
Try this
Demo
Ran in the git bash terminal
Generate cURL by Postman
Or can create cURL API by Postman
It convert
base64from client id, client secretAt
Authorizationtab, to selectBasic AuthThe enter username / password by
client idandclient secret