linkedin API로 작업하고 있습니다. 나는 https://developer.linkedin.com/docs/oauth2에 주어진 지시를 따랐다. 그래서 나는 코드를 얻었고, 그것을 액세스 토큰으로 바꿨다. 문제 없다.Linkedin API 무효 액세스 토큰
예를 들어, "4 단계 - 인증 된 요청 만들기"라는 업데이트를 게시하는 등의 API를 사용하려고하면 내 액세스 토큰이 잘못되었다고 API에서 오류가 발생합니다. API로 전송
내 헤더에 Params이 있습니다
array(5) {
[0]=>
string(22) "Connection: Keep-Alive"
[1]=>
string(137) "Authorization: Bearer AQS888888888888888888888888888888-Ab2HY"
[2]=>
string(30) "Content-Type: application/json"
[3]=>
string(17) "x-li-format: json"
[4]=>
string(19) "Content-Length: 171"
}
API 응답은 항상 나에게주는이 :
string(134) "{
"errorCode": 0,
"message": "Invalid access token.",
"requestId": "IRBXBZ1X5V",
"status": 401,
"timestamp": 1468498680913
}"
curl_getinfo()
반환이 데이터에서 내 디버그 :
array(22) {
["url"]=>
string(29) "https://api.linkedin.com/v1/?"
["content_type"]=>
string(30) "application/json;charset=UTF-8"
["http_code"]=>
int(401)
["header_size"]=>
int(495)
["request_size"]=>
int(466)
["filetime"]=>
int(-1)
["ssl_verify_result"]=>
int(0)
["redirect_count"]=>
int(0)
["total_time"]=>
float(0.275796)
["namelookup_time"]=>
float(0.003589)
["connect_time"]=>
float(0.00685)
["pretransfer_time"]=>
float(0.055621)
["size_upload"]=>
float(171)
["size_download"]=>
float(134)
["speed_download"]=>
float(485)
["speed_upload"]=>
float(620)
["download_content_length"]=>
float(134)
["upload_content_length"]=>
float(171)
["starttransfer_time"]=>
float(0.275764)
["redirect_time"]=>
float(0)
["certinfo"]=>
array(0) {
}
["redirect_url"]=>
string(0) ""
}
XML 대신 JSON으로 게시하고 응답을 기다리고 있습니다.
내가
내가, 내가 헤더에 올바르게 전달하고 있지 않다 의심 액세스 토큰이 올바른지 확신
다음 있어요 "인증 : 무기명"워드 프로세서에 대한 https://developer.linkedin.com/docs/share-on-linkedin를 참조하거나 제 엔드 포인트 URL은 확실히 아니다 올바른,이 너무 시도 :https://api.linkedin.com/v1/people/~/shares?format=json
및
https://api.linkedin.com/v2/people/~/shares?format=json
어떤 아이디어? 참고 여기에있는 대부분의 액세스 토큰을 제거했습니다. 게시하도록 요청하지 마십시오!