You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[x ] Other... Please describe: trouble with authentication, receiving unauthorized_client error
I've setup everything as outlined in the guide: a user profile, used ask-cli to generate tokens and replaced the refresh_token with the one I receive
Someone did raise the issue before #174 , but the issue was closed with no resolution
from ask_smapi_sdk import StandardSmapiClientBuilder
smapi_client_builder = StandardSmapiClientBuilder(client_id=client_id, client_secret=client_secret, refresh_token=response['refresh_token'])
smapi_client = smapi_client_builder.client()
try:
result = smapi_client.list_skills_for_vendor_v1(vendor_id=vendor_id, full_response=True)
print("==========================================")
print(result.headers)
print(result.body)
print("==========================================")
except Exception as e:
print(e.body if hasattr(e, 'body') else e)
Expected Behavior
List of skills
Current Behavior
{'error_description': 'Not authorized for requested operation',
'error_type': 'unauthorized_client'}
Your Environment
ask-smapi-sdk: 1.0.0
Operating System: Windows 10
Python: 3.6
ask-cli: 1.7.8 and 2.x.x
Python version info
Python version used for development: 3.6
The text was updated successfully, but these errors were encountered:
Hi @reddit-at-work, thanks for raising the issue.
It seems to be an issue with LWA(Login With Amazon) service where SkillManagementServiceClient is unable to retrieve the access_token from the refresh_token being passed onto the builder.
Let me contact the respective service team owners and fix the issue, will update the ticket once I get a resolution.
Sorry for the inconvenience caused.
Hi @reddit-at-work,
Can you try regenerating tokens using ASK-CLI v2 with arguments shown below ask util generate-lwa-tokens --clientId <YOUR_CLIENT_ID> --client-confirmation <YOUR_CLIENT_SECRET> and then provide the output refresh_token generated to the StandardSmapiClientBuilder ?
I believe executing ask util generate-lwa-tokens without any argument picks up the CLI's client_id and client_secret by default which might be causing the above error you've raised.
Hi @Shreyas-vgr, that solved the issue. Thank you very much! Although I'd to use client-id, client-confirmation in place of clientId and client-secret.
I'm submitting a...
I've setup everything as outlined in the guide: a user profile, used ask-cli to generate tokens and replaced the refresh_token with the one I receive
Someone did raise the issue before #174 , but the issue was closed with no resolution
Expected Behavior
List of skills
Current Behavior
{'error_description': 'Not authorized for requested operation',
'error_type': 'unauthorized_client'}
Your Environment
Python version info
The text was updated successfully, but these errors were encountered: