这是我的签名基本字符串:
POST&https%3A%2F%2Faccount.api.here.com%2Foauth2%2Ftoken&grant_type%3Dclient_credentials%26oauth_consumer_key%3Dkey%26oauth_nonce%3D123456%26oauth_signature_method%3DHMAC-SHA256%59o3oD3D_DFS_559
这是我的签名: kCGgrwFgEi85njS5WOeM88t0L70V99StMjxTXzYQEiI
这是我的授权标题 OAuth oauth_consumer_key =“ key”,oauth_nonce =“ 123456”,oauth_timestamp =“ 1585590864”,oauth_signature_method =“ HMAC-SHA256”,oauth_version =“ 1.0”,oauth_signature =“ kCGgrwFgEi85njS5WOeM88t0L70V99StMjxTXzY
这是错误: {“ errorId”:“ ERROR-f2dd0dcd-73e8-48e8-ae07-9d772e1b7399”,“ httpStatus”:401,“ errorCode”:401300,“ message”:“签名不匹配。授权签名或客户端凭据错误。”,“错误”:“ invalid_client”,“错误说明”:“ errorCode:'401300'。签名不匹配。授权签名或客户端凭据错误。”}
詹姆斯
答案 0 :(得分:0)
签名不匹配的原因是您创建的服务器与所创建的服务器不同。检查以下内容–
关于错误代码,您可以参考此-https://developer.here.com/documentation/authentication/dev_guide/topics/error-messages.html