Use the register-api-client command-line command on the TIBCO Spotfire Server to generate an API user with a client id and a client secret.
C:\tibco\tss\10.1.0\tomcat\bin\config register-api-client --name myAPIuser -Sapi.rest.automation-services-job.execute
Tool password: <provide tool password>
Successfully registered a new API client with the display name 'myAPIuser':
Client ID: 2e4e9b840e05e34a91c01cd2c54b303a.oauth-clients.spotfire.tibco.com
Client secret: 776c3d9f461d2a49a548141f8bf8ae940f6836aa9d300681c7149bf268465df
Base64 encode the client_id:client_secretYou can e.g. using one of the many available online tools to Base64 encode it (simply google for "Base64 encode")
Example:
2e4e9b840e05e34a91c01cd2c54b303a.oauth-clients.spotfire.tibco.com:776c3d9f461d2a49a548141f8bf8ae940f6836aa9d300681c7149bf268465df
encodes as:
MmU0ZTliODQwZTA1ZTM0YTkxYzAxY2QyYzU0YjMwM2Eub2F1dGgtY2xpZW50cy5zcG90ZmlyZS50aWJjby5jb206Nzc2YzNkOWY0NjFkMmE0OWE1NDgxNDFmOGJmOGFlOTQwZjY4MzZhYTlkMzAwNjgxYzcxNDliZjI2ODQ2NWRmOQ==
This will be used in the curl request
Use curl to get a temporary OAuth access token from the TIBCO Spotfire ServerNote: curl is available in the command Prompt in Windows 10.
curl --header "Content-Type: application/x-www-form-urlencoded" --header "Authorization: Basic MmU0ZTliODQwZTA1ZTM0YTkxYzAxY2QyYzU0YjMwM2Eub2F1dGgtY2xpZW50cy5zcG90ZmlyZS50aWJjby5jb206Nzc2YzNkOWY0NjFkMmE0OWE1NDgxNDFmOGJmOGFlOTQwZjY4MzZhYTlkMzAwNjgxYzcxNDliZjI2ODQ2NWRmOQ==" --request POST --data "scope=api.rest.automation-services-job.execute&grant_type=client_credentials" http://yourserverhere.com/spotfire/oauth2/token