最近,在对Soundcloud API进行简单的GET调用时,我开始出现以下错误。
* About to connect() to api-v2.soundcloud.com port 443 (#0)
* Trying 99.84.179.62...
* Connected to api-v2.soundcloud.com (99.84.179.62) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
* SSL connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate:
* subject: CN=*.soundcloud.com,OU=Domain Control Validated
* start date: Apr 12 11:01:17 2018 GMT
* expire date: Jun 08 10:08:48 2020 GMT
* common name: *.soundcloud.com
* issuer: CN=GlobalSign Domain Validation CA - SHA256 - G2,O=GlobalSign nv-sa,C=BE
> GET /charts?kind=trending&genre=soundcloud%3Agenres%3Adubstep&client_id=<REDACTED>&limit=20&offset=0 HTTP/1.1
> User-Agent: curl/7.29.0
> Host: api-v2.soundcloud.com
> Accept: */*
>
< HTTP/1.1 401 Unauthorized
< Content-Length: 0
< Connection: keep-alive
< Date: Sat, 13 Apr 2019 20:26:31 GMT
< Cache-Control: private, max-age=0
< Server: am/2
< Vary: Origin
< X-Cache: Error from cloudfront
< Via: 1.1 237bd7e86f7f99cead16dc4ecb5fed20.cloudfront.net (CloudFront)
< X-Amz-Cf-Id: EnRw9o_d0W_hSzrH6Vi9TqAfQKuNGzlZJFTz54B3noU_Ryg_l6sIGA==
<
* Connection #0 to host api-v2.soundcloud.com left intact
我没有以任何方式更改我的凭据,所以我不明白为什么这个错误突然发生。
答案 0 :(得分:0)
api-v2.soundcloud.com
是SoundCloud内部使用的未记录API,任何开发人员客户端应用程序都不应使用。 Using it breaks the SoundCloud ToS and changes to it could be made at any time.请对所有API请求使用api.soundcloud.com
。