HI , i am integrating from salesforce to box .when an account 'Test 'is created in salsesforce then

New post



  • dlansing

    We have an SDK that connects to Box from Salesforce.  


    There's no way to avoid the oauth flow (where you grant access) at least once for a given user but after going through that flow once, you can store the user's access and refresh tokens locally in Salesforce.  


    We don't allow for sending the username/password in the URL as a means of authentication.  Oauth2 is the only way to authenticate against our API.  


    If you were to use the SDK, your code would look something like

    BoxApiConnection api = new BoxApiConnection('your_client_id', 'your_client_secret', 'your_access_token', 'your_refresh_token');
    BoxFolder parentFolder = new BoxFolder(api, 'parent_folder_id');
    BoxFolder.Info createdFolderInfo = parentFolder.createFolder('New Folder Name');

    Obviously, the variable names in quotes would need to be removed and replaced with the actual values for your client id, client secret, access token, refresh token, and parent folder id.   Likely those would be retrieved from custom settings or custom objects.  It's important to encrypt the client information as well as your tokens so you don't leak those.

    Comment actions Permalink
  • Box Product Support

    Here the problems comes when trigger fires in salesforce it should automatically connect to the grant permissions but we have to authorise manually,i want to skip that step is their any other approach would be helpful


    Comment actions Permalink

Please sign in to leave a comment.