![]() ![]() ![]() We can call DropboxController from an apex method or we can create one invocable method which can be called from the flow action. After the file is uploaded, we can store the file’s location in the FileStore_c object for later use. This class is used to get file details from Salesforce object record and upload that file using the above created DropboxService class. Apex Controller Class to Use DropBox service class: This class is used to upload files using DropBox API. Apex Code: Apex Service Class for DropBox: We can use Named Credential for saving this endpoint. Now we have completed the DropBox setup, Let us create an Apex class to upload files.įor integration, we have to use API. For demo purpose, I am using a custom label DropBoxKey. Based on your organization’s application architecture, store access token. We can store the access token in custom settings, custom metadata, or Custom labels. Copy this access token and save it for later use. Without regeneration, we will get authorization failure errors.Ĭlick Generate button on Generated access token section in the Setting tab. If you already generated a token and later changed permission then we have to re-generate the token. This step should always be done after setting app permission. Generate Access TokenĪs we have now configured permission, now we can generate an access token that will be used in API integration. In the File and Folders section, enable permission and Save these changes. Without giving this access we can not upload, delete files.Ĭlick on the permission tab to configure permission for the app. Now we have to configure this application so that we can upload, create or delete files from the dropbox folder. Once you create an app, you will see the application configuration screen similar to the below image. Add configuration based on your requirement or you can do similar to the attached image. Create App by clicking on Create App button. ![]() You can use the same credential for this page also. #Dropbox developer account codeWe have to create an App for developing code with DropBox. Create App for DeveloperĪs we need to integrate DropBox with Salesforce, we need to provide access to development. You can see your account information at after verification. Once the account is created and verified, we can proceed with the next step of app creation. #Dropbox developer account trialIf you already have a DropBox account then you can skip this step.Ĭlick on the link to create a free personal trial account or you can try 30 days free business account from link.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |