Reports Data API not working properly
- Dominant language
- JavaScript
- Stars
- 27
- Forks
- 25
- PR merge metrics
- No merged PRs in 30d
Description
Hello guys,
I'm facing two issues when trying to get report data through the API :
1/ Authentication issue :
When the request is being sent to the instance, authentication isn't done properly and the login page is sent back as response.
I traced it back to this PR : **https://github.com/adobe/acc-js-sdk/pull/57/files** which removed the Cookie from headers. Currently the auth is done through : **const headers = this._getAuthHeaders(false);** which is cleaner but disallows the cookies in the headers due to the "false" in the setCookie parameter of _getAuthHeaders method.
I hacked it by hardcoding the parameter to "true" adding back the cookies to the request headers and it solves the authentication issue but this brings me to the next issue.
2/ FEATURE_NOT_SUPPORTED : Reports Data
The query response return an html document which triggers the **CampaignException.FEATURE_NOT_SUPPORTED("Reports Data")** since the code in the report method expects an xml that begins with "
Contributor guide
Research direction
Start at Client.getReportData(), then trace _getAuthHeaders(false) and the report response handling that expects XML beginning with
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100