Trimble Connect User Forum

 View Only
Expand all | Collapse all

How authenticate automatically 3D viewer

  • 1.  How authenticate automatically 3D viewer

    Posted 08-21-2020 06:27

    Hello,

     

    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="https://3d.connect.trimble.com/?accessToken=[...]&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: 

    https://app.connect.trimble.com/tc/static/apidoc.html#header-step-1-register-application-with-trimble-identity-(tid) 

    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 ?



  • 2.  RE: How authenticate automatically 3D viewer

    Posted 10-20-2021 08:33
    Hi, did you manage to solve this?

    Would you mind sharing your solution?

    Thank you!

    ------------------------------
    Alejandro Gomez Rivera
    ------------------------------