how to request auth code from Smartsheet via Postman

二次信任 提交于 2019-12-11 14:55:43

问题


so I am trying to request an authorization code from smartsheet using postman. I created a new app on my smartsheet with the following url:

app url: https://localhost:3000/

redirect url: https://localhost:3000/callback

so I tried to use the GET https://app.smartsheet.com/b/authorize and input my client id, scope, repsonse_type, and state in postman

the result says there is an error and it did not direct me to a page where I am able to allow authorization.

I am expecting something similar to what the website says (http://smartsheet-platform.github.io/api-docs/#access-levels). I am not sure which part I did was wrong, I am wrong home for this volunteer work hence I do not have an appropriate url. I don't know if it's my urls that are causing the problem or there's something else.

thank you guys in advance


回答1:


If you are building out the Smartsheet OAuth flow you will need to have a hosted environment where you can have requests sent and be able to open a page in a browser to authenticate to the Smartsheet account and select the Allow button to confirm the access token should be created and returned to your application.

For development purposes you can use a service like ngrok to create a publicly available URL for your localhost which will allow you to send and receive the necessary data from Smartsheet in your development environment.




回答2:


Authorization tokens cannot be generated from the API - you must do them from the website. From the API documentation:

  1. Click the "Account" button in the upper-right corner of the Smartsheet screen, and then click "Personal Settings".
  2. Click the "API Access" tab.
  3. Click the "Generate new access token" button to obtain an access token.


来源:https://stackoverflow.com/questions/56016000/how-to-request-auth-code-from-smartsheet-via-postman

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!