The Hub is now in read-only mode as we make improvements to the Hub experience. More information is available here.
07-19-2023 12:58 AM - edited 07-19-2023 01:00 AM
Hi folks,
I need help with something that should be straightforward. I want to execute the Get API Call List Club Activities (getClubActivitiesById) [https://developers.strava.com/docs/reference/#api-Clubs-getClubActivitiesById]. I meet the pre-requi...
Via Postman I execute the following actions:
1. Get Action: https://www.strava.com/api/v3/clubs/**bleep**/activities?page=&per_page=
2. In the Headers Section I define the Key field as "Authorization" and specify its value with "Bearer 'YourAccessToken'"
3. The response I get is the following:{ "message": "Bad Request", "errors": [ { "resource": "Application", "field": "page", "code": "invalid" } ] }What is weird is that the API call does get picked up as an API call on the API Usage report in the My Application API section. I hence conclude that the API call is executed correctly but I am lacking authorization, but I am sure I use the right token at the right time.
Hence my question:
What am I doing wrong here?
I appreciate ANY help on this one.
Thank you and best regards
Jan
Solved! Go to Solution.
07-20-2023 08:18 AM - edited 07-20-2023 08:19 AM
I haven't played around with that specific API call, but according to the error message:
{ "message": "Bad Request", "errors": [ { "resource": "Application", "field": "page", "code": "invalid" } ] }
field: page, code: invalid
That would imply it is unhappy with you passing a blank value for the page argument. You'll likely have the same issue with per_page. Either don't pass those arguments (the defaults are page=1, per_page=30) or set them to valid values and give it a try.
07-20-2023 11:16 PM
@Pico de Orizaba,
you are the man💪. Thank you for this one. I thought blanks resulted in defaults. My bad!
Have a great day and again thank you so much for the support!
07-20-2023 08:18 AM - edited 07-20-2023 08:19 AM
I haven't played around with that specific API call, but according to the error message:
{ "message": "Bad Request", "errors": [ { "resource": "Application", "field": "page", "code": "invalid" } ] }
field: page, code: invalid
That would imply it is unhappy with you passing a blank value for the page argument. You'll likely have the same issue with per_page. Either don't pass those arguments (the defaults are page=1, per_page=30) or set them to valid values and give it a try.
Welcome to the Community - here is your guide to help you get started!