dpsfay2510 2013-09-16 19:54
浏览 41

surveymonkey api授权问题

We are setting up a website, where users will fill out and submit answers to a surveymonkey survey. After the user submits his survey answers, we will access that data through an API call and generate a report for the user based on that data.

Everything works perfectly, EXCEPT every time I open a new browser and access the website, it takes me to https://api.surveymonkey.net/oauth/authorize?client_id=XXXXXX&redirect_uri=http%3A%2F%2FXXXXXXXXX%2Flogin_with_surveymonkey.php&response_type=code&state=1379358300-12fd31&api_key=XXXXXXXXXX (the X's cover identifying info), where I need to "Authorize user_name to use your SurveyMonkey account" ('user_name' is the SM-developer account login name). Once I input my SM account login and password, the website works perfectly and I can successfully do as many API calls as I want without any issues. However, if I close and reopen the browser window, I need to go through that tedious authorization process again.

Is there any way to permanently grant authorization to my surveymonkey account for my app, so that I don't need to go through this process every time I open a new browser window?

Thanks!

  • 写回答

1条回答 默认 最新

  • douzheng0702 2013-09-16 20:52
    关注

    How are you storing the access token for the SurveyMonkey user?

    Once you have generated an access token via OAuth for a particular SurveyMonkey user, that token will work until it expires (if it has an expiry time in it) or until the user revokes access. Only when that happens, i.e. you receive an error saying "Client revoked access grant", you should discard the old access token and reauthorize.

    The access token is what you get back when you call through to /oauth/token (with the code retrieved from /oauth/authorize).

    评论

报告相同问题?

悬赏问题

  • ¥60 求一个简单的网页(标签-安全|关键词-上传)
  • ¥35 lstm时间序列共享单车预测,loss值优化,参数优化算法
  • ¥15 基于卷积神经网络的声纹识别
  • ¥15 Python中的request,如何使用ssr节点,通过代理requests网页。本人在泰国,需要用大陆ip才能玩网页游戏,合法合规。
  • ¥100 为什么这个恒流源电路不能恒流?
  • ¥15 有偿求跨组件数据流路径图
  • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
  • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
  • ¥15 CSAPPattacklab
  • ¥15 一直显示正在等待HID—ISP