box / box-salesforce-sdk

This is the Salesforce SDK for integrating with the Box Platform.
https://developer.box.com/guides/tooling/sdks/salesforce/
Apache License 2.0
58 stars 51 forks source link

Cannot obtain user token based on the enterprise configuration for your app #17

Closed oleg-underscore-r closed 8 years ago

oleg-underscore-r commented 8 years ago

I am using the JWT auth and not able to connect with the app user after creating one through enterprise connection. ` BoxJwtEncryptionPreferences preferences = new BoxJwtEncryptionPreferences(); preferences.setPublicKeyId(publicKeyId); preferences.setPrivateKey(privateKey);

       BoxPlatformApiConnection pApi = BoxPlatformApiConnection.getAppEnterpriseConnection(userId, clientId, clientSecret, preferences);

BoxApiConnection api = new BoxApiConnection (pApi.getAccessToken()); //create api instance

BoxUser.createAppUser (api, 'appUser2');

` This one successfully gives me the token and creates a user for the app.

After that one I am trying to getappuserconnection but getting error. What am I missing? My app is configured to work with app users.

BoxPlatformApiConnection pApi = BoxPlatformApiConnection.getAppUserConnection(userId, clientId, clientSecret, preferences);

bassman531 commented 8 years ago

This is a known issue on our end right now and is not specific to any SDK. The same issue was reported against our Java SDK. I will update this issue thread once we have a resolution.

oleg-underscore-r commented 8 years ago

Thanks @bassman531 . Do you have an ETA of the fix or any workaround?

tarrencev commented 8 years ago

@OlegForce this issue should be resolved now, sorry for the inconvenience

oleg-underscore-r commented 8 years ago

Great :) Thank you!

mlugert commented 7 years ago

As of January 27, 2017 I'm seeing this exact same thing using the Java SDK, using this branch: box-java-sdk-2.2.3-SNAPSHOT

@bassman531