Oauth token, return 401 error

You didn’t include this step in your code, so I reiterated it.

The problem is your PHP code not sending headers correctly.

See my corrective code