Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More info needed for providing Spotify and Youtube api keys #39

Closed
froggeric opened this issue May 25, 2018 · 2 comments
Closed

More info needed for providing Spotify and Youtube api keys #39

froggeric opened this issue May 25, 2018 · 2 comments

Comments

@froggeric
Copy link

Before

  • [ x] I have checked for similar issues already
  • [ x] My issue is not a bad syncronisation between the Spotify track and the YouTube audio (Those go here.)

Description

The documentation does not state how to enter the api key details in the config.json file, and the provided sample file omits those fields. I have managed to get spotify working with:
"spotifyClient": "",
"spotifySecret": "",
but not YouTube. I tried using:
"googleClient":"",
"googleSecret":"",
but keep getting the error listed below.

Console Logs

[EternalJukebox -> ] Loaded config
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[AnalysisAPI -> ] Initialised Analysis API
[SiteAPI -> ] Initialised Site API
[AudioAPI -> ] Initialised Audio API
[YoutubeAudioSource -> ] Warning: No API key provided. We're going to scrape the Youtube search page which is a not great thing to do.
To obtain an API key, follow the guide here (https://developers.google.com/youtube/v3/getting-started) or over on the EternalJukebox Github page!
[NodeAPI -> ] Initialised Node API
[OpenGraphHandler -> ] Initialised Open Graph
[StaticResources -> ] Initialised Static Resources
[SpotifyAnalyser -> reload] Attempting to reload Spotify Token; Attempt 0
[SpotifyAnalyser -> reload] Successfully reloaded the Spotify token
[EternalJukebox -> start] Now listening on port 11037

@JoySpaceCats
Copy link

JoySpaceCats commented May 25, 2018

I second this, the documentation is lacking on the fields required in the config file.

[edit]

From scanning through the source code I spot this on line 139 in the ProfileAPI.kt file, so there are other variables here which get queried.

val (_, response) = Fuel.post("https://www.googleapis.com/oauth2/v4/token", listOf( "code" to code, "client_id" to googleClient, "client_secret" to googleSecret, "redirect_uri" to redirectURI, "grant_type" to "authorization_code" )).response()

Then on line 193:
val (_, responseRefresh) = Fuel.post("https://www.googleapis.com/oauth2/v4/token", listOf( "refresh_token" to account.googleRefreshToken, "client_id" to googleClient, "client_secret" to googleSecret, "grant_type" to "refresh_token"
Disclaimer: I've never written any code in Java

@UnderMybrella
Copy link
Member

This should be fixed now by 12f4da3; check config_template.yaml or config_template.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants