# getBrowserToken

Gets a GUID Token, that identifies the browser. This token will **NOT** be different, when you close all browser tabs and start the Gebra Suite again. But it will be different, when you delete the local storage for that url. You could use this to identify a shopping cart, for example.

## Example Usages

```javascript
let myToken = app.getBrowserToken();
```

## app.**getSessionToken**

GUID stands for Global Unique Identifier. A GUID is a 128-bit integer (16 bytes) that you can use for authentication purposes. There are many types of GUID tokens, one of them is browser token. We can use this token to identify a user for same browser because his token will **NOT** be different, when you close all browser tabs and start the Gebra Suite again. But it will be different, when you delete the local storage for that url. This function can be used to get GUID for browser. It can then be used to keep user session open. Another usecase is that it could be used to identify a shopping cart. An important aspect here to note is that when when you close all browser tabs and start the Gebra Suite again, this token will not be different.

## Another Example

An example user is that user can get access tokens using this **getBrowserToken** functions from two apps and compare them to confirm user identity i.e after login this can be used as authenticate the user between different browser sessions.

### Return Values

The getBrowserToken function returns a string. It retrieves a session token from the browser's local storage. If a token is not already present, it generates a new one using the (internal) createGUID function and stores it in the local storage before returning the token.
