我正在尝试获取OneDrive API的访问令牌。我使用以下详细信息获取访问令牌:
https://login.live.com/oauth20_authorize.srf?client_id=CLIENT_ID&redirect_uri=REDIRECT_URI&response_type=token&scope=wl.skydrive_update
得到了这个回复:
?lc=2057#access_token=EwCAAq1DBAAUGCCXc8wU/zFu9QnLdZXy%2bYnElFkAAcigT92GxO3G9HB%2bKArednttIIIc7hIoMK3NKFGj9/BVQDn%2b%2bGBgvhLMyDlPg%2bPwaklDCVaXEM/j8DS57USZmwMyGYwlyjRnAgQ%2bplHwWmEU2QqbWHWNkpP4QEuC4nuQllB3owSA309d2WeOoVHD%2b0AS86s20FvZy9FT3slOcAHG3iI1jBEIzB6AqyksR/rOdnE3dz4sEKd1TLK8m0dzR72Myv5G9ltYlGRZbojfZwybQE254OihyflOI8/ZGx%2b5HRqjL8eZqu1tpwgWfq0/4p8czUNtSb8pvj12CosWN1PlLl3yWQrMYprja7v0gY6GE7pDXxo6y%2busYOkHfwv6PRUDZgAACBXNy30OOl1qUAFudoejdTAjLDNk1GgVfsEw2pt0ho2jbnOm3BfYwB5BMyyN/vbsx8ATOvbUWZHAcLEghcZP7nEoQsP6Oqw4SVzbsLOXX4ZeFjJDkeeH2hxYAfYPmKcq%2be3lUd75sFa4JkEQk9LHL9GIhWniPTXmsBRvoU0RSt3VI7ZFkS6Fw5iYgRrKPkcLbQDwyHgBayVhvLZlzpwefvx%2bj3KuEHdRNSjlxn2DvikKxduBKrAFSKfBj4E3h0lapNXLimZEzfanyJxu9yz/YR546I1%2b2VNqF3vTBplPMax9rjGIQjHL0Z2qW3NX/0OV3p2CMVNZRVmv6DE52E7sr222gRoeJZL4HyW%2bEZ6qt3Kk4OsmguPrpGux4%2bEHIqEVvljG%2bHaKHnsS3sMKJ1AVQEDMNvc28/dwBAAxGmOyyMEL%2bBlx55gPDw3%2bhyyRxTabeC/XiQzBi5g7l7poAQ%3d%3d&token_type=bearer&expires_in=3600&scope=wl.skydrive_update%20wl.signin%20wl.offline_access%20wl.basic&user_id=992501247416dbdab653d966ad62c6fd
但现在我很难找到访问令牌,因为响应访问令牌太长了。
任何人都可以告诉我如何获取访问令牌吗?
答案 0 :(得分:0)
响应是查询字符串的形式,因此您可以使用查询字符串解析库来解析数据,并允许您按名称检索access_token
。