Not getting the catalog list. Im writing code in node js my code is correct still getting undefined

listCatalog: function (companyKey, callback) {

     var appName = "squarepos"
     commonHelper.getCredentials(companyKey,appName, function (credErr, credentialsData) {
             responseMsg = commonHelper.commonMsg('failure', ' Failed to get credentials ', '', credErr);
           const client = new Client({
             environment: credentialsData.environment,
             accessToken: credentialsData.consumerSecret
           console.log("client secret is ============>",client);
           try {
            const response =  client.catalogApi.listCatalog();

            console.log("response is ===========>",response.result);
          } catch (error) {
            if (error instanceof ApiError) {
            } else {
              console.log("Unexpected Error: ",  error)


Hi @sandeept, looking at your logs it looks like you are making successful calls to the Catalog API with the SDK. Were you able to get it to work?

1 Like