Comments (7)
@pyorot hey man, you have to add the token to the twitch obj,itβs all well fetching one but you also need to use either a app access or user token, when declaring the twitch helix obj, or update the options in some way or form
from helix.
Do you have a worked example? I was just following this one; I define the helix object using client ID and client secret.
from helix.
I just found out that this library has not been sending the Bearer token. I found out because resp.GetRateLimit() returned 30 instead of 800.
It seems a lot of oauth code has been re-written instead of using the official oauth2 package, so it doesn't quite behave the same as other packages. I wonder what happens when the app token expires?
Got it to work using this:
ops := &helix.Options{
ClientID: config.Config.TwitchClientID.Get(),
ClientSecret: config.Config.TwitchClientSecret.Get(),
}
client, err = helix.NewClient(ops)
token, err := client.GetAppAccessToken()
client.SetAppAccessToken(token.Data.AccessToken)
from helix.
Yeah, I also got it to work the same way, confirmed during the 2020/5/4 token requirement window. Leaving the issue open until issues #42, #44, and the usage example are updated accordingly.
from helix.
This is already documented here.
Please open a PR if you would like to add any further documentation.
from helix.
The authentication_docs.md usage example is missing the SetAppAccessToken()
line. I don't fancy forking the repo just to correct that.
from helix.
I don't fancy forking the repo just to correct that.
Then stop wasting our time, and either write your own library or use another.
from helix.
Related Issues (20)
- Proposal: Add option to pass in state for each API request HOT 5
- Proposal: Add default rate limit function HOT 2
- Client does not use AppAccessToken on calls that must use AppAccessToken HOT 4
- missing api endpoints
- Need to add VodOffset. HOT 2
- Latest Release is 12.13.0 not 2.13.0 HOT 1
- Endpoint errors but returned error is nil
- Support `tags` for the stream resource HOT 1
- Implement Schedule endpoints
- Auto Refreshing Access Tokens
- Update follows endpoint to new version HOT 1
- When scope for endpoint is missing in the access token, it gets locked in a loop refreshing the access token
- Proposal: Context for methods, not for struct itself
- GetBlockedTerms() does not use provided data HOT 2
- AddBlockedTerm() does not use provided data HOT 2
- Add send message endpoint request
- GetBannedUsers() returns nothing HOT 14
- event EventSubChannelPredictionEndEvent json ended_at typo HOT 1
- Most recent patch release broke "API" HOT 1
- Add "Warn Chat User" endpoint HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from helix.