K
Kinde3w ago
Hans

Kinde Management API: next_token usage

I am trying to figure out how to use the next_token. Right now, it is always provided regardless if the max page size has been reached. It would be ideal to only return if there is more data, but that doesn't seem to be the case. So, I looking to leverage next_token if the max page size is reached. However, it isn't clear how the next_token is provided with subsequent API calls. Is it part of the body using content_type application/x-www-form-urlencoded?
3 Replies
CB_Kinde
CB_Kinde3w ago
Hi @Hans I can't refer this to our API person until tomorrow. But have you tried asking about this in the #⚡⏐ask-kinde-ai channel?
david - Kinde
david - Kinde2w ago
Hi @Hans It's on our radar to update this so that the next token is not returned if there are no more results to display. The 'next_token' attribute is always included in the response body as json, in the final request that returns no results it will be null like this: { "code": "OK", "users": null, "message": "Success", "next_token": null }
Hans
HansOP5d ago
RIght now, I am only paying attention to the next_token if the count returned is equal to the max records (500). It will be good when next_token is empty if there no more data as this will easier to develop towards, especially if the max records change in the API unbeknownst to us.

Did you find this page helpful?