无法检索访问令牌linkedin API [英] unable to retrieve access token linkedin api

查看:102
本文介绍了无法检索访问令牌linkedin API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在申请connect with linkedin.我正在遵循逐步指南.为了验证用户身份,我从获得了帮助.

I am applying connect with linkedin. I'm following the step by step guide. To authenticate users, I took help from this.

当用户单击connect with linkedin按钮时,用户将被带到Linkedin登录页面.用户授予该帐户访问权限后,该用户将被重定向到:

When the user clicks the connect with linkedin button the user is taken to the linkedin login page. After the user has given access to the account the user is redirected to:

https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=1ba8ogpm9e05&scope=r_basicprofile%20r_emailaddress&state=STATE&redirect_uri=http://127.0.0.1:8088/sandbox/linkedin/test.php

通过此操作,我获得了授权码.并将其传递到以下网址

Through this, I get the authorization code. And pass it in the following url

https://www.linkedin.com/uas/oauth2/accessToken?grant_type=authorization_code&code=AUTHORIZATION_CODE&redirect_uri=http://127.0.0.1:8088/sandbox/linkedin/final.php&client_id=1ba8ogpm9e05&client_secret=n7GN09I3F2L3IJD1

在这里,错误就出现了.

Here, the error comes i.e.

"error":"invalid_request","error_description":"missing required parameters, includes an invalid parameter value, parameter more then once. : Unable to retrieve access token : appId or redirect uri does not match authorization code or authorization code expired"

我要去哪里错了?我已经仔细检查了我的api密钥和秘密密钥.

Where am I going wrong? I have double checked my api key and secret key.

推荐答案

https://www.linkedin.com/uas/oauth2/accessToken?grant_type=authorization_code&code=AUTHORIZATION_CODE&redirect_uri=http://127.0.0.1:8088/sandbox/linkedin/final.php&client_id=1ba8ogpm9e05&client_secret=n7GN09I3F2L3IJD1
https://www.linkedin.com/uas/oauth2/authorization?response_type=code&client_id=1ba8ogpm9e05&scope=r_basicprofile%20r_emailaddress&state=STATE&redirect_uri=http://127.0.0.1:8088/sandbox/linkedin/test.php

根据 LinkedIn身份验证指南,这两个都应包含相同的redirect_uri:

This both should contain same redirect_uri according to the LinkedIn authentication guide:

参数: redirect_uri
说明:必需.与上一步中传递的redirect_uri相同.
可能的错误:

Parameter: redirect_uri
Description: Required. Same redirect_uri that you passed in the previous step.
Possible Errors:

  • redirect_uri与授权代码生成期间使用的redirect_uri不同
  • 传递了无效的值
  • 传递了一个空值或空白值
  • 缺少参数
  • Different redirect_uri than used during authorization code generation
  • Passed an invalid value
  • Passed an empty or blank value
  • Missing the parameter

这篇关于无法检索访问令牌linkedin API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆