Frontend
This section provides more information about connecting the frontend to your Intrasheets server.
Documentation
Settings
The following properties are available to render your Intrasheets interface.
Method | Description |
---|---|
server: string | Your Intrasheets server URL. Example: 'https://yourdomain.com' |
path?: string | API pathname. Default: api/ |
guid?: string | Spreadsheet GUID identifier. Example: c4a0edc0-edbf-43a3-827f-0fe5101401a5 |
signature?: string | User signature provided by your backend. It will define your permissions to access a spreadsheet. |
license: string | Intrasheets License. You can download from the website. |
clientId?: string | Google Sheets API ClientId |
clientSecret?: | Google Sheets API ClientSecret |
apiKey?: | Google Sheets API apiKey |
errorUri?: | Google Sheets API errorUri |
redirectUri?: | Google Sheets API redirectUri |
Example
The following template will render the Intrasheets frontend.
<html>
<head>
<title>Intrasheets</title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
<link href="https://cdn.jsdelivr.net/npm/intrasheets/dist/style.min.css" rel="stylesheet" />
</head>
<body>
<div id="content"></div>
</body>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/intrasheets/dist/index.min.js"></script>
<script>
Sheets(document.getElementById('content'), {
// Your Intrasheets server URL
server: 'https://yourdomain.com',
// Spreadsheet GUID identifier
guid: 'c4a0edc0-edbf-43a3-827f-0fe5101401a5',
// User signature provided by your backend
signature: 'jwt-backend-generated-signature',
// Intrasheets License
license: 'your-intrasheets-certificate-key',
});
</script>
</html>
Authorization
As explained previously in this documentation, Intrasheets does not manage logins. The front should send the signature, which is a JWT. The backend should provide the signature and have different formats, which is covered in the next section.