# Token login for apps

The URL of the service is **/token**

The following parameters are supported

- create
- login 
    - redirect
- renew

For safety allways use HTTPS and only use POST method for transmitting the token

### <span class="mw-headline" id="bkmrk-using-the-token-serv-1">Using the token service</span>

#### <span class="mw-headline" id="bkmrk-create-1">create</span>

Returns a token that can be used for login.

```
https://site.acme.com/TempusServa/token?create
```

```
c8d10470f211c21794849ad0c3aab154
```

#### <span class="mw-headline" id="bkmrk-login-1">login</span>

Creates a session for the user and redirects to the front page

```
https://site.acme.com/TempusServa/token?login=c8d10470f211c21794849ad0c3aab154
```

```
Directs to: https://site.acme.com/TempusServa/main
```

Additionally a custom page can be selected

```
https://site.acme.com/TempusServa/token?login=c8d10470f211c21794849ad0c3aab154&redirect=main?command=com.acme.tspages.CustomPage
```

```
Directs to: https://site.acme.com/TempusServa/main?command=com.acme.tspages.CustomPage
```

#### <span class="mw-headline" id="bkmrk-renew-1">renew</span>

Removes old token and creates a new one

```
https://site.acme.com/TempusServa/token?renew=c8d10470f211c21794849ad0c3aab154
```

```
098f6bcd4621d373cade4e832627b4f6
```

#### <span class="mw-headline" id="bkmrk-delete-1">delete</span>

Removes old token and creates a new one

```
https://site.acme.com/TempusServa/token?delete=c8d10470f211c21794849ad0c3aab154
```