Skip to content

Product Recommendations SDK returns 403 error #147

@deekshithnb

Description

@deekshithnb

Is there an existing issue for this?

  • I have searched the existing issues

Expected behavior

it should return product data

Actual behavior

Whenever I use the Product Recommendations SDK ping method, it shows a 403 error. I searched multiple documents; there is no reference to adding any other key or credentials-related information.
response : {
"status": 403,
"data": "{ "error": { "code": "Forbidden", "message": "Client ID is missing", "details": { "error_code": "403000" } } }\n"
}
Screenshot

Steps to reproduce

Screenshot

Environment

  • Browser: Crome
  • OS: linux

Sample code

const client = new RecommendationsClient({
environmentId: "e0d84de8-2c34-4fa1-9f2f-8c3dda755dbb",
websiteCode: "base",
storeViewCode: "default",
storeCode: "main_website_store",
instanceId: "7d5096bd21e34459b47555f59f925401",
});

    // Register pre-built recommendation unit
    client.register({
      name: "trending",
      type: "trending",
      //   filters: "categories: (disposable)",
    });
    // Retrieve recommendations for all units
    client.ping().then((e) => {
      debugger;
     /*  response : { "status": 403,  "data": "{ \"error\": { \"code\": \"Forbidden\", \"message\": \"Client ID is missing\",\"details\": { \"error_code\": \"403000\" } } }\n" */

}
});

Logs

response : {
"status": 403,
"data": "{ "error": { "code": "Forbidden", "message": "Client ID is missing", "details": { "error_code": "403000" } } }\n"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingmajor-updateSignificant original updates to existing content

    Type

    No type

    Projects

    Status

    🆕 Ready for Grooming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions