Giter VIP home page Giter VIP logo

Comments (7)

jackmcguire1 avatar jackmcguire1 commented on August 17, 2024

@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.

pyorot avatar pyorot commented on August 17, 2024

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.

Jleagle avatar Jleagle commented on August 17, 2024

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.

pyorot avatar pyorot commented on August 17, 2024

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.

nicklaw5 avatar nicklaw5 commented on August 17, 2024

This is already documented here.

Please open a PR if you would like to add any further documentation.

from helix.

pyorot avatar pyorot commented on August 17, 2024

The authentication_docs.md usage example is missing the SetAppAccessToken() line. I don't fancy forking the repo just to correct that.

from helix.

nicklaw5 avatar nicklaw5 commented on August 17, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.