Getting current session URL
If you would like to pass the Cohere session URL to other services (e.g. your CRM or analytics platform), you can use the Cohere.addSessionUrlListener API:
// Add a session URL listener
const listener = (sessionUrl) => {
// sessionUrl is a string corresponding to the current session's URL
};
Cohere.addSessionUrlListener(listener);
// Remove a session URL listener
Cohere.removeSessionUrlListener(listener);
Copy link