ALERT: Some images may not load properly within the Knowledge Base Article. If you see a broken image, please right-click and select 'Open image in a new tab'. We apologize for this inconvenience.

CA API Management: Invalid JSON export for OAuth Client custom field


Article ID: 77087


Updated On:


STARTER PACK-7 CA Rapid App Security CA API Gateway


In OTK 4.0 when exporting a client configuration an invalid JSON message is produced if a client name, description, organization or custom field contained double-quote characters. 

    "client_key_custom": {\
        "lifetimes\": {\"oauth2_access_token_lifetime_sec\": 86400, \"oauth2_refresh_token_lifetime_sec\": 432000}}


Component: APIGTW


This can resolved by either upgrading to a new version of the OTK or implementing a policy change to correct the behavior.

1. Edit the endpoint <instance_modifier>/manager/clients/

<Please see attached file for image>

OTK Clients

2. Locate the "OTK Client Export" assertion on line 76 (OTK 4.0)
3. Immediately following this assertion add the assertion "Evaluate Regular Expression" (within the oauth/manager/client).

<Please see attached file for image>

Clients Policy

4. Configure the assertion as follows:

<Please see attached file for image>

Custom RegEx

5. Save an activate the policy



1558702312942000077087_sktwi1f5rjvs16kvq.png get_app
1558702311281000077087_sktwi1f5rjvs16kvp.png get_app
1558702309385000077087_sktwi1f5rjvs16kvo.png get_app