---
title: "TToken"
canonical: "https://docs.dk.is/space/DEV/10354737/TToken"
format: markdown
---
The TToken class is used for authentication in a SOAP Header  
you can request the creation of a token using CreateToken and the request a new one using RefreshToken 

## Properties



1. APPID - [string](https://dkdocs.atlassian.net/wiki/pages/createpage.action?spaceKey=dev&title=string&linkCreation=true&fromPageId=10354737) <sub>1..8</sub>  
This property is used to identify the application communicating with the system
2. CompanyId - [string](https://dkdocs.atlassian.net/wiki/pages/createpage.action?spaceKey=dev&title=string&linkCreation=true&fromPageId=10354737)  
this is the company identification number of the company that the token is assigned to
3. CompanyName - [string](https://dkdocs.atlassian.net/wiki/pages/createpage.action?spaceKey=dev&title=string&linkCreation=true&fromPageId=10354737)  
Name of the company the token is assigned to
4. Employee  
ID of the employee the token is assigned to
5. Name - [string](https://dkdocs.atlassian.net/wiki/pages/createpage.action?spaceKey=dev&title=string&linkCreation=true&fromPageId=10354737)  
the name of the employee the token is assigned to
6. Token - [sting](https://dkdocs.atlassian.net/wiki/pages/createpage.action?spaceKey=dev&title=sting&linkCreation=true&fromPageId=10354737)  
[Guid](https://dkdocs.atlassian.net/wiki/pages/createpage.action?spaceKey=dev&title=Guid&linkCreation=true&fromPageId=10354737) that represents the token/apikey
7. UserName - [string](https://dkdocs.atlassian.net/wiki/pages/createpage.action?spaceKey=dev&title=string&linkCreation=true&fromPageId=10354737)  
The uniqe id of the user the Token is assigned to
8. ValidUntil - [DateTime](https://dkdocs.atlassian.net/wiki/pages/createpage.action?spaceKey=dev&title=DateTime&linkCreation=true&fromPageId=10354737)  
This is the Date and Time when the token will no longer be able to query the service

 

> ℹ️ Token is the recommended authentication method to be used

## Related articles



> Macro (contentbylabel)

> Macro (details)
> 
> | **Related issues** |  |
> | --- | --- |