It's hard to say as you are passing a lot of additional parameters which aren't needed and could be messing up the request (like the cookies). It may also be a temporary issue as usually you'd get an error about an invalid request rather than a CloudFront error. That said, there are several issues that I can see:
- If you're trying to create an activity, it should be a POST request to /activities, not a GET
- You don't need any of the parameters you're passing except the authorization header. See createActivity for the list of arguments
- Also your authorization header has a typo. It needs to be Bearer
- You need to pass the parameters listed in createActivity.
Before you try to create an activity I would recommend starting with a much simpler call like getLoggedInAthlete which doesn't require any parameters. It will let you verify that the rest of your setup like getting a token is correct. Once you've got that working you can move on to other API calls which require additional arguments.
Hello,
I made it!
Although I faced errors with code 400 bad request when I had this Bearer in string.
I have to say I don't quite understand what is it.
Anyhow, I found someone put access_token in string to other API CALL when this Bearer was required. So I followed same logic and put access_token instead of "Bearer [token]". And from that moment it works as a charm!
Thank you for you help, your guidance was helpful!
Cheers,
Lukasz