Connecting to Typeform
Authentication to TypeForm can be done using the OAuth standard or a Personal Access Token (APIKey).
Using OAuth Authentication
To authenticate to TypeForm, you must first register and configure an OAuth application with TypeForm here: https://admin.typeform.com/account#/section/tokens. Your app will be assigned a client ID and a client secret which can be set in the connection string. More information on setting up an OAuth application can be found at https://developer.typeform.com/get-started/.
Note that there are several different use scenarios which all require different redirect URIs:
- CData Desktop Applications: CData desktop applications (Sync, API Server, ArcESB) accept OAuth tokens at /src/oauthCallback.rst. The host and port is the same as the default port used by the application. For example, if you use http://localhost:8019/ to access CData Sync then the redirect URI will be http://localhost:8019/src/oauthCallback.rst.
- CData Cloud Applications: CData cloud applications are similar to their desktop counterparts. If you access Connect Cloud at https://1.2.3.4/ then you should use the redirect https://1.2.3.4/src/oauthCallback.rst.
- Desktop Application: When using a desktop application, the URI https://localhost:33333 is recommended.
- Web Application: When developing a web application using the driver, use your own URI here such as https://my-website.com/oauth.
After setting the following connection properties, you are ready to connect:
- AuthScheme: Set this to OAuth.
- InitiateOAuth: Set this to GETANDREFRESH. You can use InitiateOAuth to manage the process to obtain the OAuthAccessToken.
- OAuthClientId: Set this to the Client Id that is specified in your app settings.
- OAuthClientSecret: Set this to Client Secret that is specified in your app settings.
- CallbackURL: Set this to the Redirect URI you specified in your app settings.
Example Connection String
Profile=C:\profiles\TypeForm.apip;Authscheme=OAuth;InitiateOAuth=GETANDREFRESH;OAuthClientId=your_client_id;OAuthClientSecret=your_client_secret;CallbackUrl=your_callback_url;
Using APIKey Authentication
You can also authenticate using a Typeform Personal Access Token. Create a Personal Access Token from your Typeform account here: https://admin.typeform.com/account#/section/tokens.
After creating your Personal Access Token, set the following connection properties:
- AuthScheme: Set this to APIKey.
- APIKey: Set this to your Typeform Personal Access Token.
Example Connection String
Profile=C:\profiles\TypeForm.apip;AuthScheme=APIKey;ProfileSettings='APIKey=your_personal_access_token';
Available Tables
The Typeform API Profile provides access to online form building and response data across 10 tables:
- CustomMessages - Query the customizable messages for a specific form, retrieved in the form's specified language.
- Form - Query a single form by ID, including any theme and images attached to it.
- Forms - Query the list of all forms, public and private, in your Typeform account.
- Images - Query the images available in your Typeform account.
- MyAccounts - Query your own Typeform account information.
- Responses - Query form responses, including the date and time of form landing and submission.
- Themes - Query the themes available in your Typeform account.
- Webhooks - Query the webhooks configured for a specific form.
- Workspace - Query a single workspace by ID, including its members and forms.
- Workspaces - Query all workspaces in your Typeform account.
Usage Examples
CustomMessages:
SELECT * FROM CustomMessages WHERE FormId = 'form123'
Form:
SELECT * FROM Form WHERE Id = 'form123'
Forms:
SELECT * FROM Forms
Images:
SELECT * FROM Images
MyAccounts:
SELECT * FROM MyAccounts
Responses:
SELECT * FROM Responses WHERE FormId = 'form123'
Themes:
SELECT * FROM Themes WHERE Id = 'theme123'
Webhooks:
SELECT * FROM Webhooks WHERE FormId = 'form123'
Workspace:
SELECT * FROM Workspace WHERE Id = 'workspace123'
Workspaces:
SELECT * FROM Workspaces
Connection Properties
The connection string properties are the various options that can be used to establish a connection. This section provides a complete list of the options you can configure in the connection string for this provider.
| Property | Description |
| APIKey | The Personal Access Token for your Typeform account. |
| AuthScheme | The scheme used for authentication. Accepted entries are None, OAuth, or APIKey. Allowed values are: BASIC, NONE, NTLM, OAUTH, APIKEY, OAUTH_CLIENT, OAUTH_PASSWORD |
| CallbackURL | Identifies the URL users return to after authenticating to API via OAuth (Custom OAuth applications only). |
| InitiateOAuth | Specifies the process for obtaining or refreshing the OAuth access token, which maintains user access while an authenticated, authorized user is working. Allowed values are: OFF, REFRESH, GETANDREFRESH |
| OAuthAccessToken | Specifies the OAuth access token used to authenticate requests to the data source. This token is issued by the authorization server after a successful OAuth exchange. |
| OAuthClientId | Specifies the client ID (also known as the consumer key) assigned to your custom OAuth application. This ID is required to identify the application to the OAuth authorization server during authentication. |
| OAuthClientSecret | Specifies the client secret assigned to your custom OAuth application. This confidential value is used to authenticate the application to the OAuth authorization server. (Custom OAuth applications only.). |
| OAuthExpiresIn | Specifies the duration in seconds, of an OAuth Access Token's lifetime. The token can be reissued to keep access alive as long as the user keeps working. |
| OAuthRefreshToken | Specifies the OAuth refresh token used to request a new access token after the original has expired. |
| OAuthSettingsLocation | Specifies the location of the settings file where OAuth values are saved. |
| OAuthTokenTimestamp | Displays a Unix epoch timestamp in milliseconds that shows how long ago the current access token was created. |
| OAuthVerifier | Specifies a verifier code returned from the OAuthAuthorizationURL . Used when authenticating to OAuth on a headless server, where a browser can't be launched. Requires both OAuthSettingsLocation and OAuthVerifier to be set. |
| Scope | Scope(s) to use when authenticating, that control access to specific information. |