All OAuth tokens invalid?

Quick update and additional inquiry.

I’ve setup a messy method for checking my token and it is showing up as invalid.

array(2) { ["status"]=> int(401) ["message"]=> string(20) "invalid access token" }

I’m using the following to get this output. (Just in case I’m messing up somewhere on my end and don’t actually realize it.)

<?php
$cl = curl_init('https://id.twitch.tv/oauth2/validate');
curl_setopt($cl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($cl, CURLOPT_TIMEOUT, 30);
curl_setopt($cl, CURLOPT_CONNECTTIMEOUT, 30);
curl_setopt($cl, CURLOPT_HTTPHEADER, array(
    'Client-ID: MY-Client-ID',
    'Authorization: Bearer My-OAuth-Token'
));

$data = curl_exec($cl);
curl_close($cl);
$status = json_decode($data, true);

var_dump($status);

If the Client-ID and OAuth token don’t match I should get the error I’m getting if I understood the documentation and the post provided.

If I don’t provide the Token I’ll get an error saying that it’s missing all together.

I’ve testing this through bash curl, python, and php and they all give me the invalid response.

The token was created with the Client-ID so they should match. Not sure if creating a new app profile would be advised or not but I will await a response from those who know better than I. :slight_smile:

Thanks again.