Tôi nhận thấy rằng một số mã tôi đã viết bằng SoundcloudPHP đã ngừng xác thực hôm nay, mặc dù nó hoạt động tốt trong lần trước tôi đã sử dụng nó vài ngày trước. Để loại bỏ vấn đề, tôi đã cố xác thực bằng cách sử dụng điểm cuối/oauth2/token nhưng phản hồi là một cơ thể 401 và trống. Tôi đã sử dụng các curl từ trang tại https://developers.soundcloud.com/docs/api/reference#tokensoundcloud/oauth2/token không trả lại gì ngoài phản hồi 401
Từ dòng lệnh:
curl -v -X POST "https://api.soundcloud.com/oauth2/token" -F 'client_id=MY_ID' -F 'client_secret=MY_SECRET' -F 'grant_type=authorization_code' -F 'redirect_uri=MY_REDIRECT' -F 'code=0000000EYAA1CRGodSoKJ9WsdhqVQr3g'
Câu trả lời:
* About to connect() to api.soundcloud.com port 443 (#0)
* Trying 72.21.91.127... connected
* Connected to api.soundcloud.com (72.21.91.127) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: none
CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using AES256-SHA
* Server certificate:
* subject: OU=Domain Control Validated; CN=*.soundcloud.com
* start date: 2014-04-22 16:52:12 GMT
* expire date: 2016-04-08 10:08:48 GMT
* subjectAltName: api.soundcloud.com matched
* issuer: C=BE; O=GlobalSign nv-sa; CN=GlobalSign Domain Validation CA - SHA256 - G2
* SSL certificate verify ok.
> POST /oauth2/token HTTP/1.1
> User-Agent: curl/7.19.7 (x86_64-pc-linux-gnu) libcurl/7.19.7 OpenSSL/0.9.8k zlib/1.2.3.3 libidn/1.15
> Host: api.soundcloud.com
> Accept: */*
> Content-Length: 658
> Expect: 100-continue
> Content-Type: multipart/form-data; boundary=----------------------------e695cc6c8133
>
< HTTP/1.1 100 Continue
< HTTP/1.1 401 Unauthorized
< Access-Control-Allow-Headers: Accept, Authorization, Content-Type, Origin
< Access-Control-Allow-Methods: GET, PUT, POST, DELETE
< Access-Control-Allow-Origin: *
< Access-Control-Expose-Headers: Date
< Cache-Control: private, max-age=0, must-revalidate
< Date: Thu, 01 Oct 2015 23:25:25 GMT
< Server: am/2
< Content-Length: 0
<
* Connection #0 to host api.soundcloud.com left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
tôi đã tạo ra thẻ khách hàng mới để xem họ' d làm việc và tôi nhận được điều tương tự. Vì tôi đang sử dụng curl được cung cấp trong tài liệu tôi mong đợi nó hoạt động. Bất kỳ ý tưởng?
Soundcloud viết và nó cần được cố định ngay bây giờ. – evenodd