Skip to content
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

Need Example: Bynder Asset Upload with Client Credentials as grant type. #130

Open
rogeliohh opened this issue Dec 12, 2024 · 2 comments
Open

Comments

@rogeliohh
Copy link

I imported the Java Bynder SDK into our ecosystem and I am implementing asset upload functionality to Bynder, using an AWS Lambda function that receives assets from an AWS S3 bucket, and we are using Client Credentials as grant type for Authentication against our Bynder OAuth App.

For now I am following the bynder example from the sdk package: https://github.com/Bynder/bynder-java-sdk/blob/master/src/main/java/com/bynder/sdk/sample/UploadSample.java But I am getting an error when the lambda code gets to Desktop desktop = Desktop.getDesktop(); and it looks like this error occurs because this approach is not compatible with a Lambda environment being a headless environment and also looks like this approach might not be using Client Credentials as grant type as authentication flow.
 
Could you please provide an example of how to implement asset upload with using the Client Credentials grant type as authentication flow?

Thank you in advance!

@ahongbynder
Copy link
Contributor

ahongbynder commented Dec 12, 2024

@rogeliohh The Java SDK does not support client credentials grant type at the moment, only authorization code. You can try using a permanent token similar to what was done in this example https://github.com/Bynder/bynder-java-sdk/blob/master/src/main/java/com/bynder/sdk/sample/AppSample.java#L51-L72

Permanent token can be setup within portal settings. Permanent tokens may be deprecated in the future, and we will need to implement client credentials support in the future.

cc: @thegreatdeku

@rogeliohh
Copy link
Author

@ahongbynder When will client credentials be supported by the Java SDK?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants