Follow these instructions to acquire an API security token.
- In https://api.trimblepaas.com/landing, select ProjectSight or ProjectSight-EU.
- Select Get Key.
- Copy the following values:
- Application Name
- Consumer Key
- Consumer Secret
- Package & Usage Plan Key
- To obtain a security token from Trimble ID (TID), POST a request to https://id.trimble.com/oauth/token with the following information
- Header: Authorization
- Value: Basic KeyNote: The key in the Authorization value is a single string that consists of the Consumer Key and the Consumer Secret, separated by a colon (ConstumerKey:ConsumerSecret) and then Base64-encoded
- Value: Basic Key
- Header: Content-Type
- Value: application/x-www-form-urlencoded
- Body
- grant_type=client_credentials
- scope=[Application Name]Note: Replace [Application Name] with the value copied in the previous step.
POST https://id.trimble.com/oauth/token/
Authorization: Basic TE9pU...
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Cache-Control: no-cache
grant_type=client_credentials
scope=Trimble-ProjectSightApp1
Note: If the request is successful, the response contains a Json class with several properties.- The
access_tokenproperty is used to make the API calls. - The
expires_inproperty defines how many seconds the token is valid for.
If the request fails, the response includes two fields, error and error_description, that describe the problem.
- Header: Authorization