oauth-2.0oauthaccess-tokensmartsheet-apismartsheet-api-2.0

SmartSheet - I am trying to get access token using Oauth


I am trying to integrate Power Automate (Workflow service) with SmartSheet using OAuth 2.0

I have got the auth code successfully and when I finally try to get the token, it throws the message - 'You are not authorized to perform this action.' with error code 1004

I tried in Postman with the same result. Flow to SmartSheet


Solution

  • I believe the problem is that you're specifying all 5 values via the Request Header. Only Content-Type is specified via the Header -- the other four parameters (client_id, client_secret, code, and grant_type) should be specified via the query string. You're getting the not authorized error because Smartsheet is looking for the value of client_id etc. in the query string but not finding it there.

    For example, here are screenshots from Postman that show setting Content-Type via the Headers and the other four parameters via the Params:

    Headers in Postman request

    enter image description here