Alexander V Posted August 2, 2021 Share Posted August 2, 2021 Is there any endpoint in the REST API to get clubs for a specific members? The other way around is mighty inefficient with lots of members per club… Link to comment Share on other sites More sharing options...
Solution Daniel F Posted August 27, 2021 Solution Share Posted August 27, 2021 The /core/clubs endpoint will return only visible clubs if you're using oAuth 🙂 /** * GET /core/clubs * Get list of clubs * * @apiparam int page Page number * @apiparam int perPage Number of results per page - defaults to 25 * @note For requests using an OAuth Access Token for a particular member, only clubs the authorized user can view will be included * @return \IPS\Api\PaginatedResponse<IPS\Member\Club> */ That said, I have raised an internal suggestion to add an additional parameter to pass a specific member Link to comment Share on other sites More sharing options...
Alexander V Posted September 2, 2021 Author Share Posted September 2, 2021 On 8/27/2021 at 1:18 PM, Daniel F said: The /core/clubs endpoint will return only visible clubs if you're using oAuth 🙂 /** * GET /core/clubs * Get list of clubs * * @apiparam int page Page number * @apiparam int perPage Number of results per page - defaults to 25 * @note For requests using an OAuth Access Token for a particular member, only clubs the authorized user can view will be included * @return \IPS\Api\PaginatedResponse<IPS\Member\Club> */ That said, I have raised an internal suggestion to add an additional parameter to pass a specific member Thank you! That would be great. I imagine requesting an oauth token for every member wouldn’t be wonderful. Our usecase is that we want to add a discord bot to pair with brilliantdiscord - giving clubs their own channel, giving members points for using it, and so on. 🙂 Link to comment Share on other sites More sharing options...
Daniel F Posted November 4, 2021 Share Posted November 4, 2021 This was implemented for 4.6.9 🙂 IPCommerceFan 1 Link to comment Share on other sites More sharing options...
Roboko Posted November 7, 2021 Share Posted November 7, 2021 On 11/4/2021 at 7:42 PM, Daniel F said: This was implemented for 4.6.9 🙂 Is this just a change for this specific endpoint? It would be nice to filter other things down too. For example, getting Topics or Events using an API Key brings back stuff most people should not be able to see, it would be nice to be able to pass a member id for these too. I tried to figure out how to impersonate a user with oAuth to do just this and never figured it out. I am sure if I had more hours in the day I could, but it's not exactly an easy task for someone like me. Link to comment Share on other sites More sharing options...
Recommended Posts