Unable to make call to Campaign API | Community
Skip to main content
Adobe Employee
July 1, 2020
Question

Unable to make call to Campaign API

  • July 1, 2020
  • 4 replies
  • 3462 views

I have setup a firefly app and build a project using the out of box template. However whenever I make a call to the Campaign's getProfiles api call (out of box ) it shows a server error. There is no other error to debug why this could be happening.

I have also used the project from here https://github.com/AdobeDocs/adobeio-samples-customers-dashboard However the same error when making a call to either getprofiles or send-promo.

Below is the debug stmts when debugging thru VS code

 

GET-PROFILES

 

020-07-01T17:43:01.358544100Z 2020-07-01T17:43:01.355Z [main /260965-campaigndashboard-stage/customers-dashboard-0.0.2/__secured_get-profiles] info: Calling the main action
2020-07-01T17:43:01.361061600Z 2020-07-01T17:43:01.360Z [main /260965-campaigndashboard-stage/customers-dashboard-0.0.2/__secured_get-profiles] debug: {"LOG_LEVEL":"debug","__ow_headers":{"accept":"*/*","accept-encoding":"gzip, deflate, br","accept-language":"en-US, en;q=0.9","authorization":"<hidden>","connection":"close","content-type":"application/json","host":"controller-a","origin":"https://localhost:9080","perf-br-req-in":"1593625379.689","referer":"https://localhost:9080/?_mr=https%3A%2F%2Fexperience.adobe.com%2Fassets%2Fruntime.0c1c1f0b.js&shell_domain=experience.adobe.com","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36","x-forwarded-for":"67.188.179.10, 10.250.204.31","x-forwarded-host":"260965-campaigndashboard-stage.adobeioruntime.net","x-forwarded-port":"443","x-forwarded-proto":"https","x-gw-ims-org-id":"xxxxxxx@AdobeOrg","x-request-id":"UJY4lMkbcNVHPBc3dgXsC0SfE79kSn8L"},"__ow_method":"post","__ow_path":"","apiKey":"c54465b21e7042a1b43ad4f","body":{"message":"validation success"},"statusCode":200,"tenant":"acs1008.msavlab"}
2020-07-01T17:44:05.970552500Z 2020-07-01T17:44:05.969Z [main /260965-campaigndashboard-stage/customers-dashboard-0.0.2/__secured_get-profiles] error: [CampaignStandardSDK:ERROR_GET_ALL_PROFILES] Error: Bad Request
2020-07-01T17:44:05.971044700Z 2020-07-01T17:44:05.970Z [main /260965-campaigndashboard-stage/customers-dashboard-0.0.2/__secured_get-profiles] info: 500: server error
2020-07-01T17:44:05.975235300Z XXX_THE_END_OF_A_WHISK_ACTIVATION_XXX
2020-07-01T17:44:05.977268700Z XXX_THE_END_OF_A_WHISK_ACTIVATION_XXX
Completed activation c43e0523f1b44d34be0523f1b4bd349b in 64.661 sec
{ error: { statusCode: 500, body: { error: 'server error' } } }

 

GET-PROMO

2020-07-01T17:47:58.371923000Z 2020-07-01T17:47:58.371Z [main /260965-campaigndashboard-stage/customers-dashboard-0.0.2/__secured_send-promo] debug: {"LOG_LEVEL":"debug","__ow_headers":{"accept":"*/*","accept-encoding":"gzip, deflate, br","accept-language":"en-US, en;q=0.9","authorization":"<hidden>","connection":"close","content-type":"application/json","host":"controller-a","origin":"https://localhost:9080","perf-br-req-in":"1593625678.149","referer":"https://localhost:9080/?_mr=https%3A%2F%2Fexperience.adobe.com%2Fassets%2Fruntime.0c1c1f0b.js&shell_domain=experience.adobe.com","user-agent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.100 Safari/537.36","x-forwarded-for":"67.188.179.10, 10.250.204.31","x-forwarded-host":"260965-campaigndashboard-stage.adobeioruntime.net","x-forwarded-port":"443","x-forwarded-proto":"https","x-gw-ims-org-id":"XXXXXXX@AdobeOrg","x-request-id":"Ot8eYCa0okYQqidX7jbtTsI7ew3I9gvk"},"__ow_method":"post","__ow_path":"","apiKey":"c54465b21e7042a1b43ad4f","body":{"message":"validation success"},"email":"test@gmail.com","statusCode":200,"tenant":"acs1008.msavlab","workflowId":"wkf1"}
2020-07-01T17:48:44.347600000Z 2020-07-01T17:48:44.346Z [main /260965-campaigndashboard-stage/customers-dashboard-0.0.2/__secured_send-promo] error: [CampaignStandardSDK:ERROR_GET_WORKFLOW] Error: Bad Request
2020-07-01T17:48:44.349630200Z 2020-07-01T17:48:44.346Z [main /260965-campaigndashboard-stage/customers-dashboard-0.0.2/__secured_send-promo] info: 500: server error
2020-07-01T17:48:44.349699200Z XXX_THE_END_OF_A_WHISK_ACTIVATION_XXX
2020-07-01T17:48:44.350816300Z XXX_THE_END_OF_A_WHISK_ACTIVATION_XXX
Completed activation 5fe9be62f3a34beea9be62f3a3fbeef4 in 45.995 sec
{ error: { statusCode: 500, body: { error: 'server error' } } }

 

The tenant of my Campaign instance is acs1008.msavlab, could that be reason for the issue ?

Any help would be appreciated.

Thank you.

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

4 replies

Adobe Employee
July 2, 2020
Hi - does it work when you make a request directly to ACS API? Are you able to get profiles using the API?
Adobe Employee
July 2, 2020
Thanks duypnguyen, it was user error 😞 had the incorrect Campaign_tenant Id in the configuration. However the process to debug is not straight forward as we get a very generic server error message.
Adobe Employee
July 3, 2020
Ok - great to hear that it's working for you now. The SDK relies heavily on the errors returned from the ACS API. While we try to provide as much useful info as possible in the error messages, some are hard to capture without a detailed message from the API. What you got looks like an instance of that.
Adobe Employee
July 3, 2020

@harpreet_ahluwa , according to the comment, the error was due to an incorrect tenant ID. You should be able to run the code with a correct tenant.

Please let me know if you have other questions.

shelly-goel
Adobe Employee
Adobe Employee
December 12, 2020
@duynguyen_adobe I'm facing the same issue and I have validated the tenant id and it is correct. If I try the same endpoint (https://55762-acscustomers-dev.adobeioruntime.net/api/v1/web/acscustomers-0.0.1/get-profiles) with all the required headers in postman I get the same "server error" but if I try the ACS API endpoint to get all the profiles, it works fine ({{acs_url}}/campaign/profileAndServices/profile). Please suggest what could be missing.