Legacy Dev Forum Posts

 View Only

Sign Up

Configure Integration Credential via putIntegrationConfigCurrent is failing

  • 1.  Configure Integration Credential via putIntegrationConfigCurrent is failing

    Posted 06-05-2025 18:41

    Andrei_LV | 2019-12-19 16:28:08 UTC | #1

    Hi everyone,

    I'm posting here a topic from Genesys comunity Forum: https://community.genesys.com/digestviewer29/viewthread?GroupId=19&MessageKey=0816e524-4717-42db-8cb9-8568b4682832&CommunityKey=bab95e9c-6bbe-4a13-8ade-8ec0faf733d4&tab=digestviewer&ReturnUrl=%2fcommunities%2fcommunity-home1%2fdigestviewer%3fcommunitykey%3dbab95e9c-6bbe-4a13-8ade-8ec0faf733d4%26tab%3ddigestviewer

    shortly: we are trying to save a set of already created credentials on an Integration via API.

    REQUEST: PUT https://api.mypurecloud.com/api/v2/integrations/69203e0e-9867-4cad-abca-68f7a67bc5c2/config/current

    { "name": "LumenVox Voice Biometrics--Integration", "version": 2, "properties": { "url": "https://www.lumenvox.com", "sandbox": "allow-forms,allow-modals,allow-popups,allow-presentation,allow-same-origin,allow-scripts", "displayType": "standalone", "featureCategory": "", "groupFilter": [ "a290397d-d635-49a5-91f5-1c084086f5d3", "e1a8c8a6-a349-4b33-b03d-6f586e7eb5ca" ] }, "advanced": {}, "notes": "Web API Credentials", "credentials": { "id": "e3ee278d-0ce1-4c57-b606-183b8501ecdf", "name": "Integration-69203e0e-9867-4cad-abca-68f7a67bc5c2", "createdDate": "2019-12-19T15:16:44Z", "modifiedDate": "2019-12-19T15:16:44Z", "type": { "name": "basicAuth" }, "selfUri": "/api/v2/integrations/credentials/e3ee278d-0ce1-4c57-b606-183b8501ecdf" } }

    RESPONSE: { "status": 400, "code": "bad.request", "message": "The request could not be understood by the server due to malformed syntax.", "contextId": "7512afa6-a7cc-4a92-9f1f-e757cd6557ee", "details": [], "errors": [] }

    The request is failing if the Credentials are included. If Credentials are empty the request will succeed.

    Any clue on the right syntax we must use?

    Thanks! Andrei


    Becky_Powell | 2019-12-19 16:33:52 UTC | #2

    Andrei, I don't see that credentials are required for this integration. There is no credentials property in the integration type "premium-app-lumenvox":

    { "id": "premium-app-lumenvox", "name": "LumenVox Biometric Authentication", "description": "Integrate PureCloud with LumenVox Voice Biometric Authentication.", "provider": "clientapps", "category": "Client Apps", "images": [ { "resolution": "144x135", "imageUri": "https://dhqbrvplips7x.cloudfront.net/integ-registry/318/images/lumenvox-logo.svg" } ], "configPropertiesSchemaUri": "/api/v2/integrations/types/premium-app-lumenvox/configschemas/properties", "configAdvancedSchemaUri": "/api/v2/integrations/types/premium-app-lumenvox/configschemas/advanced", "helpUri": "https://www.lumenvox.com/support/", "termsOfServiceUri": "https://www.lumenvox.com/legal/", "vendorName": "LumenVox", "vendorWebsiteUri": "https://www.lumenvox.com/passive-voice-biometrics/", "marketplaceUri": "https://appfoundry.genesys.com/filter/purecloud/listing/abf725aa-511d-4f91-86ee-7247aa2cb8a7", "privacyPolicyUri": "https://www.lumenvox.com/privacy/", "supportContactUri": "mailto:support@lumenvox.com", "salesContactUri": "mailto:genesyssales@lumenvox.com", "nonInstallable": false, "maxInstances": 10, "userPermissions": [ "integration:lumenvoxApps:view" ], "vendorOAuthClientIds": [ "06e4566f-560e-4742-bf63-82f7b7438901" ], "selfUri": "/api/v2/integrations/types/premium-app-lumenvox" }


    Becky_Powell | 2019-12-19 16:34:37 UTC | #3

    (FYI I fetched the above by calling GET /api/v2/integrations/types)


    Andrei_LV | 2019-12-19 17:02:54 UTC | #4

    Hi Becky,

    Thanks for the quick replays.

    I was trying to create a 'Data Action' Integration type and not a 'Client Application' Integration;

    Creating a 'Data Action' via API, without configuring credentials is working fine. Adding the credentials manually from the web UI is also working fine. Testing the external application from the web UI is successful. Only adding the 'Credentials' via API is the issue.

    Regards, Andrei


    Richard.Schott | 2019-12-20 17:54:44 UTC | #5

    Can you post the payload you're attempting to use for the data action integration?


    Jason_Mathison | 2019-12-30 15:27:51 UTC | #6

    For situations like this we will often see what happens in the UI with the browser's developer console open. In this case, it looks like the integration configuration expects the credentials part of the configuration to look like:

    ,"credentials":{"basicAuth":{"id":"e3ee278d-0ce1-4c57-b606-183b8501ecdf","selfUri":"/api/v2/integrations/credentials/e3ee278d-0ce1-4c57-b606-183b8501ecdf"}},

    Note: The UI does an initial post to create the integration prior to creating the credential, then creates the credential and finally does a post to attach the credential to the integration. I would guess that creating everything in one post would work, but it is possible that there are underlying reasons that require the post, post, put approach.

    --Jason


    Andrei_LV | 2020-01-03 10:13:02 UTC | #7

    • in the first step the integration is created using postIntegrations(integrationBody) API.
    • in the second step the credentials are created using postIntegrationsCredentials(credentials)
    • in the third step the integration created in the first step is configured using putIntegrationConfigCurrent(data.id, integrationConfig); integrationConfig object is containing the CredentialInfo object obtained in the second step.

    the payload for the third step is listed in the first entry of this topic.

    Thank you! Andrei


    Andrei_LV | 2020-01-03 10:20:55 UTC | #8

    at the moment the login attempt to:

    https://login.mypurecloud.com/oauth/authorize?&client_id=ec4a8853-8b6d-4caa-9401-xxxxxxxxxx&redirect_uri=https://genesysinstaller.xxxxxxxxx.net/wizard/index.html&response_type=token&state=pcEnvironment%3Dmypurecloud.com

    is failing with /#/error?errorKey=invalidClientId

    is it possible that our client ID is expired? how can I check that in the apps.mypurecloud.com web portal?

    Thank you! Andrei


    Andrei_LV | 2020-01-03 11:37:49 UTC | #9

    via 'Developer Tools' we've got the same behavior:


    Andrei_LV | 2020-01-03 11:46:48 UTC | #10

    The integration type we use is supporting basicAuth Credentials:

    Maybe "credentials"."basicAuth"."required" flag should be set to 'true' ?


    Andrei_LV | 2020-01-03 14:47:14 UTC | #11

    Jason_Mathison, post:6, topic:6779
    ,"credentials":{"basicAuth":{"id":"e3ee278d-0ce1-4c57-b606-183b8501ecdf","selfUri":"/api/v2/integrations/credentials/e3ee278d-0ce1-4c57-b606-183b8501ecdf"}},

    Jason solution worked in the end. :slight_smile: Everything works fine now!

    Thanks a lot for your support! Best Regards, Andrei


    system | 2020-02-03 14:47:17 UTC | #12

    This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.


    This post was migrated from the old Developer Forum.

    ref: 6779