Nest device access 授权设备访问时没有刷新令牌
我可以通过Partner Connections Manager成功授权用户,但当我从Nest device access 授权设备访问时没有刷新令牌,nest-device-access,Nest Device Access,我可以通过Partner Connections Manager成功授权用户,但当我从https://www.googleapis.com/oauth2/v4/token使用我的授权码,我在响应中没有收到刷新\u令牌,只有访问\u令牌存在: { access_token: 'my-access-token', expires_in: 3599, scope: 'https://www.googleapis.com/auth/sdm.service', token_type: 'B
https://www.googleapis.com/oauth2/v4/token
使用我的授权码,我在响应中没有收到刷新\u令牌
,只有访问\u令牌
存在:
{
access_token: 'my-access-token',
expires_in: 3599,
scope: 'https://www.googleapis.com/auth/sdm.service',
token_type: 'Bearer'
}
确保在合作伙伴连接管理器(PCM)URL中指定
access\u type=offline
。省略它假定access\u type=online
,它不提供刷新令牌
例如,PCM URL应该如下所示,其中access\u type=offline
:
https://nestservices.google.com/partnerconnections/project-id/auth?
redirect_uri=my-redirect-uri&
access_type=offline&
prompt=consent&
client_id=my-client-id&
response_type=code&
scope=https://www.googleapis.com/auth/sdm.service
然后,来自https://www.googleapis.com/oauth2/v4/token
应该具备您所期望的:
{
"access_token": "my-access-token",
"expires_in": 3599,
"refresh_token": "my-refresh-token",
"scope": "https://www.googleapis.com/auth/sdm.service",
"token_type": "Bearer"
}
有关更多信息,请参阅设备访问网站上的