Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F183628
arcanist.diff
k__nard (Pascal Migazzi)
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Advanced/Developer...
View Handle
View Hovercard
Authored By
k__nard
Sep 24 2022, 18:26
2022-09-24 18:26:44 (UTC+0)
Size
1 KB
Referenced Files
None
Subscribers
None
arcanist.diff
View Options
diff --git a/src/future/twitch/PhutilTwitchFuture.php b/src/future/twitch/PhutilTwitchFuture.php
index 9dc06c34..9e6cf1c1 100644
--- a/src/future/twitch/PhutilTwitchFuture.php
+++ b/src/future/twitch/PhutilTwitchFuture.php
@@ -47,12 +47,12 @@ final class PhutilTwitchFuture extends FutureProxy {
}
$uri = new PhutilURI('https://api.twitch.tv/');
- $uri->setPath('/kraken/'.ltrim($this->action, '/'));
- $uri->replaceQueryParam('oauth_token', $this->accessToken);
+ $uri->setPath('/helix/'.ltrim($this->action, '/'));
$future = new HTTPSFuture($uri);
$future->setData($this->params);
$future->setMethod($this->method);
+ $future->addHeader('Authorization', 'Bearer ' . $this->accessToken);
// NOTE: This is how the Twitch API is versioned.
$future->addHeader('Accept', 'application/vnd.twitchtv.2+json');
@@ -87,7 +87,7 @@ final class PhutilTwitchFuture extends FutureProxy {
throw new Exception(pht('Received error from Twitch: %s', $error));
}
- return $data;
+ return $data['data'][0];
}
}
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
134581
Default Alt Text
arcanist.diff (1 KB)
Attached To
Mode
T15122: Twitch auth provider is not working - old twitch API has been decomissioned
Attached
Detach File
Event Timeline
Log In to Comment