400 Bad Request when trying to post the API token request

Hello EveryOne,

When we are trying to generate the token using the post api - https://api.onesourcetax.com/oauth2/v1/token call  for the machine id and we are getting 400 Bad request. 

for the authorization we are using Basic Auth and passing the Client Key as a user id and Cleint Secret as a password and in body we pass the grant_type = 'client_credentials' and scope = 'urn:tr:onesource:auth:api:apiadministration'

so could please help to resolve the issue.

    "title": "SSGS3001: Error occurred while generating access token",
    "detail": "SSGS3001: Error occurred while generating access token",
    "error_code": "SSGS3001",
    "status": 400,
    "instance": "/oauth2/v1/token",
    "api_requestId": "rrt-0e318a235c1404da5-b-ea-917751-38391458-55",
    "correlationId": "1b304749-8646-40ab-b13a-d36325fc8844"
}
Parents
  • 0
    Thomson Reuters Thomson Reuters staff member

    Hi,

    Below is the sample curl to generate the token.


    curl --location 'api.onesourcetax.com/.../token' \
    --header 'Content-Type: application/json' \
    --header 'Cookie: LSLanguage=en-US' \
    --data '{
    "client_id": "#Your_ClientId",
    "scopes": "urn:tr:onesource:auth:api:apiadministration",
    "grant_type": "client_credentials",
    "client_secret": "#Your_ClientSecret"
    }'

    Could you please try to generate the token using our developer portal(Developer portal URL) or Postman tool.

    If you are still facing the issue. Please raise the support ticket to the appropriate product with all the necessary details since it will have sensitive information.

    Thank you.

Reply
  • 0
    Thomson Reuters Thomson Reuters staff member

    Hi,

    Below is the sample curl to generate the token.


    curl --location 'api.onesourcetax.com/.../token' \
    --header 'Content-Type: application/json' \
    --header 'Cookie: LSLanguage=en-US' \
    --data '{
    "client_id": "#Your_ClientId",
    "scopes": "urn:tr:onesource:auth:api:apiadministration",
    "grant_type": "client_credentials",
    "client_secret": "#Your_ClientSecret"
    }'

    Could you please try to generate the token using our developer portal(Developer portal URL) or Postman tool.

    If you are still facing the issue. Please raise the support ticket to the appropriate product with all the necessary details since it will have sensitive information.

    Thank you.

Children
No Data