POST /clients/sync – Synchronizes client applications with auth provider.


Headers:

  • Authorization: Bearer <access_token> (required)
  • Content-Type: application/json or application/x-www-form-urlencoded (required)

Body:

  • For Auth0:
    • provider: (optional) The authentication provider. Defaults to auth0-client if omitted. See ClientProvider.
  • For Cognito:
    • provider: (required) Must be cognito-client. See ClientProvider.
    • userPoolId: (required) The Cognito User Pool ID to sync clients from.
    • product: (required) The product identifier associated with the clients to sync. See ProductKey.

Path Parameters:

  • None

Query Parameters:

  • None

  • 200 OK – Returns updates from the sync (see examples for provider-specific responses).

Status Code Meaning When it Happens
400 Bad Request Missing or invalid fields in request body
401 Unauthorized Missing or invalid authentication token
500 Internal Server Error Unexpected error during client creation
{
"error": "Detailed error message here"
}

POST /clients/sync
{}
json
{
"updatedCount": 10,
}
POST /clients/sync
{
"provider": "cognito-client",
"userPoolId": "us-east-1_1234test",
"product": "exampleProduct"
}
json
{
"totalDbClients": allDbClients.length,
"totalCognitoClients": cognitoClientIds.size,
"staleClientsFound": 0,
"staleClientsDeleted": 0,
}
  • Parameters

    • event: APIGatewayProxyEvent

      The API Gateway event containing the request.

    • context: Context
    • callback: Callback<APIGatewayProxyResult>

    Returns void | Promise<APIGatewayProxyResult>

    A Promise resolving to an API Gateway-compatible response.