Connect user sessions to your website using Papercuts
linkToken
to initiate integrationlinkToken
from your backend to initiate a integration between your user’s account and Papercuts.
USER_ID
with your user’s unique identifier, INTEGRATION_NAME
with the integration you want to link to and YOUR_COMPANY_LOGO_URL
with your company logo URL.
You can find the list of supported integrations below.
Supported Integrations
Type | Extensions | |||
---|---|---|---|---|
Documents | .pdf | .pptx | .docx | |
Images | .jpg | .jpeg | .png | .tiff |
Audio | .mp3 | .wav |
linkToken
back to your client to initialize the user account integration.
linkToken
to open the pre-built pop-up interface to link the user’s account.
init
method with the linkToken
and callbacks to handle success and error.onSuccess
callback will be called with an authToken
. You will need to exchange this authToken
for a userToken
to make requests on behalf of the user.
authToken
authToken
is a short-lived token that can be exchanged for a userToken
that can be used to make requests on behalf of the user.
AUTH_TOKEN
with the authToken
you received in the previous step.
Now the user account is linked and session details are stored securely with Papercuts. You can use the userToken
to make requests on behalf of the user. Same userToken
can be used for all connected integrations.