cancel
Showing results for 
Search instead for 
Did you mean: 

API Get Call not working

JanLZN
Shkhara

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

 

 

 

 

1 ACCEPTED SOLUTION

ActivityFix
Mount Logan

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 solution in original post

2 REPLIES 2

JanLZN
Shkhara

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

ActivityFix
Mount Logan

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.