对于客户端应用程序
为客户端应用程序
bob客服端下载收获的使用隐式授予流客户端授权。
1。将用户重定向到收获授权他们的账户与您bob客服端下载的应用程序。
得到https://example.bob客服端下载harvestapp.com/oauth2/authorize?client_id ={客户机ID} &redirect_uri 3 = https % % 2 f % 2 fexample.com % 2 fredirect_path&state = optional-csrf-token&response_type =令牌
限制访问收获一个帐户,您可以指定一个特定的web地址代替bob客服端下载api.bob客服端下载harvestapp.com
。
2。收获时获得访问令牌重定向回您的应用程序。bob客服端下载bob客服端下载收获将其发送给你重定向URI作为散列参数。
得到https://example.com/redirect_path access_token ={访问令牌}&expires_in = 64799状态= optional-csrf-token&token_type =不记名
3所示。使用访问令牌授权请求发送到收割的API。bob客服端下载
请注意:内容类型
和接受
这个请求必须头application / json
或应用程序/ xml
。
得到https://example.bob客服端下载harvestapp.com/account/who_am_i?access_token ={访问令牌}