PHP的Soundcloud 401错误

No one seems to be getting to the root of my problem in PHP. It is coming from the Soundcloud PHP library.

Particularly this method:

$access_token = $this->my_soundcloud->accessToken($_GET['code']);

I am getting a 401 error.

I examined the curl function data, and this is what I get:

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: no-cache Content-Type: text/html; charset=utf-8 Date: Fri, 15 Jul 2016 10:49:04 GMT Server: am/2 Status: 401 Unauthorized Www-Authenticate: OAuth realm="SoundCloud", error="invalid_token" Content-Length: 1

I'm probably late, but your question have your error

error="invalid_token"

what your' passing in $_GET['code'] is not a valid token.