How long does session_id that is returned on engage api last?
Hi Felix O., Please stand by as I search the Mixpanel knowledge base for an AI-powered answer. I normally take about 15 seconds or so. In case AI cannot answer your question, feel free to reach out to Mixpanel support at mixpanel.com/get-support. If you have follow-up questions for this thread, please tag me again with your question: @kapa.ai <follow-up question> đź‘‹
Feel free to ask a follow-up question once I've answered by mentioning me with @kapa.ai
Based on the knowledge sources provided, I can answer your question about the session_id returned by the Mixpanel Engage API.The session_id returned by the Engage API is valid for a limited time, but the exact duration is not explicitly stated in the provided documentation. However, we can infer some information about its usage:According to the Query API documentation, the session_id is used to request additional records when the initial API response returns the maximum number of records (defined by page_size). The documentation suggests using the session_id for subsequent requests to retrieve additional pages of data.The documentation provides an example algorithm for retrieving all records:LBKS// Get the first page of data associated with our selector expression this_page = query_api(where=YOUR_SELECTOR_EXPRESSION) do_something_with_response(this_page)LBKS// If we get fewer records than the page_size returned with our results, // then there are no more records to get. Otherwise, keep querying for additional pages. while (length of this_page.results) > = this_page.page_size: next_page_number = this_page.page + 1 this_page = query_api(where=YOUR_SELECTOR_EXPRESSION, session_id=this_page.session_id, page=next_page_number) do_something_with_response(this_page)LBKS
This suggests that the session_id remains valid for at least as long as it takes to retrieve all pages of data for a given query. However, the exact duration is not specified in the provided knowledge sources.It's important to note that the Engage API has a rate limit of 60 queries per hour and a maximum of 5 concurrent queries. These limitations may indirectly affect how long you can use a single session_id.For the most accurate and up-to-date information on the session_id duration, I recommend contacting Mixpanel support directly, as this specific detail is not provided in the given knowledge sources.
kapa.ai is still learning and improving, please let me know how I did by reacting below.
ℹ️ Tip: Mention @kapa.ai in the thread for follow-ups or DM the app for 1-to-1 help.