LINE WORKS API2.0 串接
📝

LINE WORKS API2.0 串接

Tags
LINE WORKS
API
操作筆記
Published
July 30, 2022
Author

說明參照

授權碼取得

取得 Authorization Code 授權碼

Request URL

GET https://auth.worksmobile.com/oauth2/v2.0/authorize?client_id={Client_ID}&redirect_uri={Redirect_URL}&scope={Scope}&response_type=code&state={Free_Text}

組合範例

https://auth.worksmobile.com/oauth2/v2.0/authorize?client_id=69d1YXd2HXnoeudq8aDB&redirect_uri=http://localhost:8080/implicit/callback&scope=bot&response_type=code&state=aBcDeF

說明

redirect_uri 的部分我們使用本機端的連線位置
http://localhost:8080/implicit/callback
字串組合後就可以丟去餵 chrome 然後取得回應
http://localhost:8080/implicit/callback?code=jp1SlJpblAyRHVWVzg4aFBmaA==&errorCode=00&state=aBcDeF
取得的授權碼就可供下一步驟取得 token 使用。