it seems like there is no way to issue ChannelAccessToken with this SDK
Closed this issue · 3 comments
killinsun commented
Hello. I am integrating LINE API with this SDK into my product.
According to ChannelAccessToken class, it requires Configuration class and it also requires channel_access_token
I think this specification is inconsistent and requires an access token to issue an access token 🤯
How can I issue ChannelAccessToken v2.1 from this class?
If I take a look at the node.js SDK, it doesn't need any tokens for this endpoint.
https://github.com/line/line-bot-sdk-nodejs/blob/master/lib/channel-access-token/api/channelAccessTokenClient.ts
Did I miss something?
File "my_project/line_sdk_wrapper.py", line 14, in issue_channel_access_token
line_channel_access_token = LineChannelAccessToken()
^^^^^^^^^^^^^^^^^^^^^^^^
File "my_project/.venv/lib/python3.11/site-packages/linebot/v3/oauth/api/channel_access_token.py", line 47, in __init__
api_client = ApiClient.get_default()
^^^^^^^^^^^^^^^^^^^^^^^
File "my_project/.venv/lib/python3.11/site-packages/linebot/v3/oauth/api_client.py", line 133, in get_default
cls._default = ApiClient()
^^^^^^^^^^^
File "my_project/venv/lib/python3.11/site-packages/linebot/v3/oauth/api_client.py", line 77, in __init__
self.default_headers['Authorization'] = 'Bearer ' + configuration.access_token
~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
TypeError: can only concatenate str (not "NoneType") to str
Thanks.
Yang-33 commented
which version of line-bot-sdk-python do you use?