Creates a client acting as user_id, a user of the profile. type is a non-empty list of jwt-bearer, authorization_code, password. redirect_uris is required when type includes authorization_code; each entry must be an absolute http(s) URL without fragment or whitespace, and the list joined by commas must fit 200 characters.
The response carries client_secret once. Store it: no later request returns it, and reset_secret replaces it.
Responses
-
Created - the secret is in this response only.
-
Bad Request -
nameis missing, over 100 characters or a reserved name (TASKWORKER,PUBLICLINKAPI,FLATTENTASKAPI),typeis empty or names an unknown grant,redirect_urisholds a value that is not an absolute http(s) URL without fragment or whitespace or the list joined by commas exceeds 200 characters,redirect_urisis empty whiletypeincludesauthorization_code, oruser_idis not a user of the profile (for a COMPANY caller, also when that user is a server admin or a group). -
Unauthorized - missing or invalid bearer token.
-
Forbidden - the token belongs to a BASIC user, or
profile_idis not the caller's own profile. -
Not Found -
profile_idis not a valid profile id.
curl \
--request POST 'https://api.iformbuilder.com/exzact/api/v80/[servername]/profiles/self/api_clients' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{
"name": "Field app",
"user_id": 161236,
"type": [
"jwt-bearer",
"authorization_code"
],
"redirect_uris": [
"https://app.example.com/oauth/callback"
]
}'
{
"name": "Field app",
"user_id": 161236,
"type": [
"jwt-bearer",
"authorization_code"
],
"redirect_uris": [
"https://app.example.com/oauth/callback"
]
}
{
"id": 16,
"client_key": "3f1c9b7e2a4d5c6f8e9a0b1c2d3e4f5a6b7c8d9e",
"client_secret": "7a6b5c4d3e2f1a0b9c8d7e6f5a4b3c2d1e0f9a8b"
}