跳转到内容

此頁內容由簡體中文來源自動翻譯,可能存在錯誤。

自訂 Spotify API Client 配置教程

不再會因 Spotify API 返回 429 錯誤而影響 Lyricify 使用體驗。

如果你已經完成過準備步驟,則可以直接使用之前獲得的 Client IDClient Secret,在 Lyricify Mobile 上的工作 中使用。

  1. 在瀏覽器中登入 Spotify (https://www.spotify.com),如果你已登入,可進入步驟 2。
  2. 打開 https://developer.spotify.com/dashboard,如果你是第一次打開這個網址,則需要先同意 Spotify Developer Terms。勾選下方的 I accept the Spotify Developer Terms of Service,再點擊 Accept the terms 即可。
  3. 點擊 Dashboard 頁面右上方的 Create app
    如果提示 You need to verify your email address before you can create an app.,則需要你先驗證你的郵箱。
  4. 在 Create app 頁面中填寫以下信息:
    • App name: Lyricify
    • App description: Lyricify Custom API Client
    • Website: (空著不寫)
    • Redirect URI: (填寫以下兩條,每條填寫完成後點擊 Add 按鈕)
  5. 勾選 Which API/SDKs are you planning to use? 部分中的 Web API
    勾選 I understand and agree with Spotify's Developer Terms of Service and Design Guidelines
    點擊 Save 按鈕。
  6. 這時你就能看到 Client ID,點擊 View client secret,即可顯示 Client secret。在後續步驟中將需要用到 Client IDClient Secret
  1. 如果你已經在 Lyricify Mobile 中登入了 Spotify,則需要在打開 Lyricify Mobile 後,進入登入界面時點擊 取消
  2. 在歡迎界面 自訂 API Client 區域對應處輸入準備步驟中獲取到的 Client IDClient Secret
  3. 點擊 登入 (獲取 Token),重新完成登入和授權即可。

授權時提示 INVALID_CLIENT: Invalid redirect URI

Section titled “授權時提示 INVALID_CLIENT: Invalid redirect URI”

請檢查 Redirect URI 是否填寫錯誤,確保其值包含 lyricify://callbackhttp://127.0.0.1:766/callback,而不是 https://127.0.0.1:766/callback
如果你是在 Android 或 iOS 設備上使用,請確保其值包含 lyricify://callback
請確保你使用的是 1.5.0 或更新版本的 Lyricify Mobile,且使用的是 跳轉瀏覽器登入。由於 Spotify 的調整,內嵌網頁登入 暫時無法使用,下一版本更新後將恢復。

如果你在 2025 年 4 月 9 日前創建並配置過自訂 API Client,請務必前往 Spotify Developer Dashboard 更新設置。由於 Spotify 調整了對重定向 URI 的要求,原本使用 localhost 的 URI 已不再被接受,你需要將原先的:

http://localhost:766/callback

替換為:

http://127.0.0.1:766/callback

請進入對應應用的設置頁面,並在 Redirect URI 中添加 http://127.0.0.1:766/callback。完成後即可正常使用自訂 API Client 進行授權。