Explore more
Connections
Connect to any web service using OAuth 2.0
8 min
to connect certain web services to make, you need to establish an oauth 2 0 connection oauth 2 0 (open authorization) is an industry standard protocol used for granting secure, limited access to a user's data it allows one web service to access the resources from another one on behalf of the user it also ensures that the user consents to the access and that the client service only performs specific, allowed actions to establish the oauth 2 0 connection, you must obtain client credentials from the service you want to connect to these credentials are commonly called client id and client secret, though they may have different names they authenticate your app to the authorization server to obtain those credentials, you'd usually create an app within the service or app you want to connect to in an oauth 2 0 connection, you also need to specify scopes they define the level of access your web service requests and control what the connected app can do for example, you may allow the app to read files, but not delete them example connect make to dropbox dropbox is a cloud storage service that uses the standardized oauth 2 0 protocol for authorization thus, to connect make to dropbox using oauth 2 0 authorization, you'll need to /#obtain client credentials and scopes /#establish the connection in make obtain client credentials and scopes to obtain the client credentials in dropbox, you need to create an application there, you will get the app key (client id) and app secret (client secret), which are required to establish the oauth 2 0 connection to do that log in to your dropbox account and go to the https //www dropbox com/developers/ click create apps a window to create a new app on the dbx platform will appear there, you should select scoped access under choose an api select full dropbox under choose the type of access you need enter a name for your app under name your app click create app an app configuration window will appear in the settings tab, enter https //www integromat com/oauth/cb/oauth2 as a redirect uri and click add copy the app key (client id) and app secret (client secret) and store them in a safe place you will need them later to establish the connection in make switch to the permissions tab select the scopes to let make perform the required actions in dropbox, and click submit to save the changes you will also need to add those selected scopes later when setting the connection in make you can always check the api documentation of the service you're connecting to to see which scope is required for a particular action once you have your client credentials and scopes, you can proceed with establishing the oauth 2 0 connection in make establish the connection in make for some websites or apps that do not have a dedicated make integration, you will need to use an https //apps make com/http#pkx7q module with an https //apps make com/oauth 20 authentication type if make provides a relevant app module, you can just add that module to the scenario and establish the oauth 2 0 connection this is usually simpler, as the module handles most of the configurations automatically since make has a dropbox app, we can look at both cases establish the connection in make using the http app suppose you need to create a folder in dropbox via an http post request here's how to establish the oauth connection and configure the module check the required api details in the https //www dropbox com/developers/documentation/http/documentation create a new scenario, or open the existing one and add an http > make a request module in the authentication type field, select oauth 2 0 in the credentials field, click create a connection (or add next to create a connection ) to create your oauth 2 0 connection in the connection n ame field, enter a name for your connection in the flow type field, select authorization code as you'll need to enter further both an authorize uri and token uri in the authorize uri field, enter the authorize uri https //www dropbox com/oauth2/authorize as it's defined in the dropbox api documentation in the token uri field, enter the token uri https //api dropboxapi com/oauth2/token as it's defined in the dropbox api documentation in the scope field, click +add item to add the required scope(s) in the client id field, add the app key you obtained from your dropbox app in the client secret field, add the app secret you obtained from your dropbox app click save allow access in the emerging window your connection is now successfully established to check that it works, you can make an http request to create a folder in dropbox in the url field, add https //api dropboxapi com/2/files/create folder v2 select the post method required for this api call leave the header and the query sections empty for the body section in the body content type field, select application/json in the body input method field, select data structure in the body structure field, click add to create a new data structure add a text field path to indicate where the folder should be created and how it should be called you can also add the boolean autorename field to specify whether dropbox can autorename the folder if there's a conflict click save in the body content field , add the path ( /make in this example) and disable the autorename click save and run the module you can now check your dropbox storage a new folder called make will be created you can also see it in the output establish the connection in make through the dropbox app since there's a dropbox app in make with a corresponding module, you can also add it to the scenario and establish the oauth 2 0 connection to do that create a new scenario, or open an existing one, and add a dropbox > create a folder module c lick create a connection (or add ) to create your oauth 2 0 connection in the connection configuration window in the connection n ame field, enter a name to distinguish your connection in the client id field, add the client id you obtained from your dropbox app in the client secret field, add the client secret you obtained from your dropbox app in the scope field, click +add item to add the required scopes click save allow access in the emerging window your connection is now successfully established to verify that it works, you can configure the module settings and run it to replicate what we've done above with the http > make a reques t module, add 'make' in the folder name field set the folder to a general one you can now check your dropbox storage a new folder called make will be created you can also see it in the output