Skip to main content
Solved

API Get Call not working


Forum|alt.badge.img+3

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-requisite of being a member of the club I want to extract data from.

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

 

 

 

 

Best answer by ActivityFix

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.

View original
Did this topic help you find an answer to your question?

2 replies

ActivityFix
Superuser
Forum|alt.badge.img+24
  • Superuser
  • 246 replies
  • Answer
  • July 20, 2023

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.


Forum|alt.badge.img+3
  • Author
  • Hub Rookie
  • 2 replies
  • July 21, 2023

@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!


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept, you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings