Skip to main content
Participant
July 22, 2024
Answered

[Embed SDK] Error: PARAMS_REQUEST_FAILED

  • July 22, 2024
  • 3 replies
  • 582 views

Hello,

I'm encountering an issue while trying to initialize the Adobe Embed SDK in my web application. The error message I'm receiving is:

 

Here is the code I'm using:

 

 <script>
      (async () => {
        const initializeParams = {
          clientId: '<CLIENT_ID>',
          appName: '<APP_NAME>',
        };

        const ccEverywhere = await window.CCEverywhere.initialize(initializeParams);

        const { editor } = ccEverywhere;

        const callbacks = {
          onCancel: () => {},
          onPublish: (intent, publishParams) => {
            const localData = { project: publishParams.projectId, image: publishParams.asset[0].data };
            console.log(localData);
          },
          onError: (err) => {
            console.error('Error received:', err.toString());
          },
        };

        let appConfig = { callbacks: callbacks };

        const updateImage = (localData) => {
          image_data.src=localData.image;
          project_id = localData.project;
        };

        console.log('Creating editor with config:', appConfig);

        editor.create(appConfig);
      })();
    </script>

 

I have verified that:

  1. The clientId and appName are correctly set.
  2. The SDK script is properly loaded.

Thank you

Correct answer Barranca

Hi there,

This should solve your issue:

 

editor.create({}, appConfig);

 

Explanation: the create() method expects its (optional) parameters in a specific order—see it's signature:

 

create(
   docConfig?: object, 
   appConfig?: object, 
   exportConfig?: object, 
   containerConfig?: object
): void

 

By skipping the first parameter, the method was interpreting appConfig as docConfig—hence the error.

Hope this helps!

 

 

3 replies

Barranca
Community Manager
BarrancaCommunity ManagerCorrect answer
Community Manager
November 15, 2024

Hi there,

This should solve your issue:

 

editor.create({}, appConfig);

 

Explanation: the create() method expects its (optional) parameters in a specific order—see it's signature:

 

create(
   docConfig?: object, 
   appConfig?: object, 
   exportConfig?: object, 
   containerConfig?: object
): void

 

By skipping the first parameter, the method was interpreting appConfig as docConfig—hence the error.

Hope this helps!

 

 

Davide Barranca | Sr. Developer Relations Engineer @Adobe
Participating Frequently
November 9, 2024

Hi, did you manage to find the problem for this? I'm getting the same problem and can't find resolution on here

Nimitha_J
Community Manager
Community Manager
August 26, 2024

Hi @sori31719942hqw2, Can you send us the client ID via email(njalal@adobe.com) to help debug the issue?

Nimitha | Adobe Express Extensibility Developer Experience