HI , i am integrating from salesforce to box .when an account 'Test 'is created in salsesforce then
HI ,
i am integrating from salesforce to box .when an account 'Test 'is created in salsesforce then a box folder 'Test ' should be created in box . am acheiving it by trigger ,here how to skip access,deny page? how to pass username and pasword in url directly? is their any other solution help me out
-
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.
サインインしてコメントを残してください。
コメント
2件のコメント