-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
athentication-refresh token access with SDK #31
Comments
Hi @tedatkc , In your bynder_client you are not passing the Please have a look at our example app, bynder-python-sdk/example/app.py Lines 40 to 47 in 088f585
https://github.com/Bynder/bynder-python-sdk/tree/master/example |
Sorry. I wasn't very clear. The first example from the "getting started" didn't work -- I think that warrants changes the documentation under "getting started". A little farther down, I use the scopes argument and it still doesn't work. # %% bynder_client = BynderClient( domain=DOMAIN, redirect_uri='https://localhost/callback', client_id=CLIENTID, client_secret=CLIENTSECRET, scopes=['offline', 'asset:read', 'meta.assetbank:read'], ) print(bynder_client.get_authorization_url()) code = input('Code: ') bynder_client.fetch_token(code) asset_bank_client = bynder_client.asset_bank_client media_list = asset_bank_client.media_list({ 'limit': 2, 'type': 'image' }) # RESPONSE: # ('https://https://[MYDOMAIN]/v6/authentication/ # oauth2/auth?response_type=code&client_id=[MYCLIENTID]& # redirect_uri=https%3A%2F%2Flocalhost%2Fcallback.&scope=offline+asset%3Aread+ # meta.assetbank%3Aread&state=ElNUPvMv', 'ElNUPvMv') # # ENTERED CODE from state above... # Code: ElNUPvMv # # ConnectionError: HTTPSConnectionPool(host='https', port=443): Max retries # exceeded with url: //[MYDOMAIN]/v6/authentication/oauth2/token # (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 11001] # getaddrinfo failed')) |
Since issue is closed, I don’t know if this will be seen, but including here, too:
Sorry. I wasn't very clear. The first example from the "getting started" didn't work -- I think that warrants changes the documentation under "getting started".
A little farther down, I use the scopes argument and it still doesn't work.
# %%
bynder_client = BynderClient(
domain=DOMAIN,
redirect_uri='https://localhost/callback',
client_id=CLIENTID,
client_secret=CLIENTSECRET,
scopes=['offline',
'asset:read',
'meta.assetbank:read'],
)
print(bynder_client.get_authorization_url())
code = input('Code: ')
bynder_client.fetch_token(code)
asset_bank_client = bynder_client.asset_bank_client
media_list = asset_bank_client.media_list({
'limit': 2,
'type': 'image'
})
# RESPONSE:
# ('https://https://[MYDOMAIN]/v6/authentication/
# oauth2/auth?response_type=code&client_id=[MYCLIENTID]&
# redirect_uri=https%3A%2F%2Flocalhost%2Fcallback.&scope=offline+asset%3Aread+
# meta.assetbank%3Aread&state=ElNUPvMv', 'ElNUPvMv')
#
# ENTERED CODE from state above...
# Code: ElNUPvMv
#
# ConnectionError: HTTPSConnectionPool(host='https', port=443): Max retries
# exceeded with url: //[MYDOMAIN]/v6/authentication/oauth2/token
# (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 11001]
# getaddrinfo failed'))
From: Tim Bloembergen ***@***.***>
Sent: Monday, December 5, 2022 1:59 AM
To: Bynder/bynder-python-sdk ***@***.***>
Cc: Tower, Ted ***@***.***>; Mention ***@***.***>
Subject: Re: [Bynder/bynder-python-sdk] athentication-refresh token access with SDK (Issue #31)
CAUTION: This email originated from outside the organization.
Hi @tedatkc<https://urldefense.com/v3/__https:/github.com/tedatkc__;!!O6qgkg!26_pLlOwp0riloZ8m34rl_JXeHG93jyKtNb2NQwncwgrZDCjg405z2DGBLUNu7COuJLCE87hgLilG0tQQiIFf6I$> ,
In your bynder_client you are not passing the scopes parameter, which is why you get the error "Missing required arguments: ['scopes'] error.
Please have a look at our example app, https://github.com/Bynder/bynder-python-sdk/blob/088f585d9b7ff09494e283be38a9a33636e38c48/example/app.py#L40-L47<https://urldefense.com/v3/__https:/github.com/Bynder/bynder-python-sdk/blob/088f585d9b7ff09494e283be38a9a33636e38c48/example/app.py*L40-L47__;Iw!!O6qgkg!26_pLlOwp0riloZ8m34rl_JXeHG93jyKtNb2NQwncwgrZDCjg405z2DGBLUNu7COuJLCE87hgLilG0tQmtPm3JM$>
https://github.com/Bynder/bynder-python-sdk/tree/master/example<https://urldefense.com/v3/__https:/github.com/Bynder/bynder-python-sdk/tree/master/example__;!!O6qgkg!26_pLlOwp0riloZ8m34rl_JXeHG93jyKtNb2NQwncwgrZDCjg405z2DGBLUNu7COuJLCE87hgLilG0tQB7_tsEw$>
—
Reply to this email directly, view it on GitHub<https://urldefense.com/v3/__https:/github.com/Bynder/bynder-python-sdk/issues/31*issuecomment-1336908316__;Iw!!O6qgkg!26_pLlOwp0riloZ8m34rl_JXeHG93jyKtNb2NQwncwgrZDCjg405z2DGBLUNu7COuJLCE87hgLilG0tQLHybWlE$>, or unsubscribe<https://urldefense.com/v3/__https:/github.com/notifications/unsubscribe-auth/A4P6KPD4S7YNRVXOXU6HBK3WLWOFVANCNFSM6AAAAAASSLCYB4__;!!O6qgkg!26_pLlOwp0riloZ8m34rl_JXeHG93jyKtNb2NQwncwgrZDCjg405z2DGBLUNu7COuJLCE87hgLilG0tQWKeD2b4$>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
K-C Internal Only
|
Trying to access our Bynder instance with the python SDK. I've tried the "getting started" and running into problems.
I've submitted a ticket 160448 and they redirected me here.
The text was updated successfully, but these errors were encountered: