Within Teamwork Desk you can generate an API Key from the My Profile section.
To do this click on your profile icon to the top right of Desk and select View Profile.
In the left pane, select API Keys.
From here, you can access a previously generated API Key or choose to Generate New API Key.
For more information see: My Profile