diff --git a/src/httpd_jsonapi.c b/src/httpd_jsonapi.c index d6d6f85a..93825397 100644 --- a/src/httpd_jsonapi.c +++ b/src/httpd_jsonapi.c @@ -1313,6 +1313,8 @@ jsonapi_reply_spotify(struct httpd_request *hreq) safe_json_add_string(jreply, "webapi_country", webapi_info.country); safe_json_add_string(jreply, "webapi_granted_scope", webapi_info.granted_scope); safe_json_add_string(jreply, "webapi_required_scope", webapi_info.required_scope); + safe_json_add_string(jreply, "webapi_client_id", webapi_info.client_id); + safe_json_add_string(jreply, "webapi_client_secret", webapi_info.client_secret); spotifywebapi_access_token_get(&webapi_token); safe_json_add_string(jreply, "webapi_token", webapi_token.token); diff --git a/src/library/spotify_webapi.c b/src/library/spotify_webapi.c index 9f57eebf..f2f2ca68 100644 --- a/src/library/spotify_webapi.c +++ b/src/library/spotify_webapi.c @@ -359,6 +359,9 @@ credentials_status_info(struct spotifywebapi_status_info *info) strncpy(info->required_scope, spotify_scope, (sizeof(info->required_scope) - 1)); } + info->client_id = spotify_client_id; + info->client_secret = spotify_client_secret; + CHECK_ERR(L_SPOTIFY, pthread_mutex_unlock(&spotify_credentials_lock)); } diff --git a/src/library/spotify_webapi.h b/src/library/spotify_webapi.h index 32a50ad5..0b834f7b 100644 --- a/src/library/spotify_webapi.h +++ b/src/library/spotify_webapi.h @@ -33,6 +33,8 @@ struct spotifywebapi_status_info char country[3]; // ISO 3166-1 alpha-2 country code char granted_scope[250]; char required_scope[250]; + const char *client_id; + const char *client_secret; }; struct spotifywebapi_access_token