ValueError: Unsupported token type: User Access Token
See original GitHub issueHello. I’ve got some error after successfully obtain a token from eBay.
As you can see at its documentation eBay returns "token_type": "User Access Token"
After getting the token without having a problem, when I try to request anything from its endpoint I get;
Traceback (most recent call last):
File "/home/thiras/.local/share/virtualenvs/rpi-order-data-sync-tA0i1rrc/bin/rods", line 11, in <module>
load_entry_point('rpi-order-data-sync', 'console_scripts', 'rods')()
File "/home/thiras/.local/share/virtualenvs/rpi-order-data-sync-tA0i1rrc/lib/python3.8/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/thiras/.local/share/virtualenvs/rpi-order-data-sync-tA0i1rrc/lib/python3.8/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/thiras/.local/share/virtualenvs/rpi-order-data-sync-tA0i1rrc/lib/python3.8/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/thiras/.local/share/virtualenvs/rpi-order-data-sync-tA0i1rrc/lib/python3.8/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/thiras/.local/share/virtualenvs/rpi-order-data-sync-tA0i1rrc/lib/python3.8/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/thiras/HDD/freelancer/contentassasin/rpi-order-data-sync/rpi_order_data_sync/main.py", line 132, in sync_ebay_orders
orders = ebay.get(
File "/home/thiras/.local/share/virtualenvs/rpi-order-data-sync-tA0i1rrc/lib/python3.8/site-packages/requests/sessions.py", line 543, in get
return self.request('GET', url, **kwargs)
File "/home/thiras/.local/share/virtualenvs/rpi-order-data-sync-tA0i1rrc/lib/python3.8/site-packages/requests_oauthlib/oauth2_session.py", line 477, in request
url, headers, data = self._client.add_token(
File "/home/thiras/.local/share/virtualenvs/rpi-order-data-sync-tA0i1rrc/lib/python3.8/site-packages/oauthlib/oauth2/rfc6749/clients/base.py", line 192, in add_token
raise ValueError("Unsupported token type: %s" % self.token_type)
ValueError: Unsupported token type: User Access Token
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
samples-python-flask/main.py at master - GitHub
Get tokens and validate. if not exchange.get("token_type"):. return "Unsupported token type. Should be 'Bearer'.", 403. access_token ...
Read more >eBay and Authlib Unconventional token type - Stack Overflow
The problem is eBay's token response has an unconventional token type named "User Access Token" instead of "Bearer".
Read more >Source code for oauthlib.oauth2.rfc6749.clients.base
:param access_token: An access token (string) used to authenticate requests to ... raise ValueError("Unsupported token type: %s" % self.token_type) if not ...
Read more >Access Token Error Response and Codes - Tutorialspoint
This error occurs when there is a missing parameter that includes multiple credentials, unsupported parameter value. 400. 2. unauthorized_client. The ...
Read more >Python flask - cannot validate acess token
For the moment, all the flow is good until the callback. The callback fails because the access token is invalid. It seems the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

@thiras I couldn’t get your solution to work. Incase anyone else has this issue, what I ended up doing was the following:
This avoids having to create a fake class etc.
@sambragg sure. Check my solution here; https://stackoverflow.com/a/61001852/4132845
Also check
register_compliance_hookat the official docs.