The error message "user doesn't have a valid session" typically indicates that the Mendix user making the API call does not have an active session with Teamcenter.
To resolve this issue, you can try the following steps:
Ensure that the Teamcenter credentials are correct and valid for the user making the API call.
Check if there is an active session with Teamcenter before making the API call. If there is no active session, create a new session with the correct user credentials.
If the user is authenticated and still getting the error, then it might be an issue with the session timeout. Try increasing the session timeout in the Teamcenter configuration.
Check if the user has the required permissions to make the API call.
Check if the API call is being made from a trusted network.
Try logging out of Mendix and Teamcenter, and then logging in again.