AnsweredAssumed Answered

How authenticate automatically 3D viewer

Question asked by Guest on Aug 21, 2020



According to the 3D viewer documentation (Trimble Connect 3D Viewer - Workspace API ), i can integrate the trimble 3D viewer into my web app, and i can authenticate it with accessToken and Refresh token :


<iframe src="[...]&refreshToken=[...]" id="viewer" sandbox="allow-scripts allow-modals allow-forms allow-same-origin" width="100%" height="700px" />


How Can i get these accessToken and refreshToken ? Currently i use trimble connect REST API authentication to get an access Token and a refresh Token: 

But I have an issue : if i don't use the viewer for long time (like 12 hours), accessToken is expired and refreshToken is rejected. After some time like one hour, accessToken is accepted (without changing anything and same accessToken is used) and i can reuse 3D viewer...

Is my usage incorrect ?