Marco-De-Stefani opened a new issue, #6112: URL: https://github.com/apache/incubator-devlake/issues/6112
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar issues. ### What happened 401 error when collecting incidents from pagerduty with a valid token specified ### What do you expect to happen Being able to collect incidents. Instead we have 401 returned by this call: https://api.pagerduty.com/incidents?date_range=all&limit=100&offset=0&service_ids%5B%5D=PKRB4TU&sort_by=created_at%3Adesc&total=true The issue is the fact that DevLake is not setting the Authentication header correctly: In the test endpoint (that works correctly) is being set with `"Authorization": fmt.Sprintf("Token token %s", connection.Token)` In the "PrepareTaskData" instead is set as follow: `"Authorization": fmt.Sprintf("Token %s", connection.Token)` ### How to reproduce Try to collect incidents from a pagerduty cloud instance with a token ### Anything else _No response_ ### Version v0.18.0 ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
