We developed this script so you can maintain a consistent look for Typeform login buttons within your applications.
Here is what the button will look like:
Add the button code to your application and configure it to work with the link that redirects users to the Typeform login screen (https://api.typeform.com/oauth/authorize
) so they can log in to their Typeform accounts and grant access to your app.
Here are the step-by-step instructions:
div
with a class of tf-login-button
.<script
type="text/javascript"
src="https://public-assets.typeform.com/public/oauthbtn/btn.min.js"
name="tf-login-button"
data-scope="{your_scopes}"
data-redirect_uri="{your_redirect_uri}"
data-state="{state}"
data-client_id="{your_client_id}"
></script>
data-
attributes on the script tag with your application's data (including clientID, redirectURI, scopes, and so on).The script will use the data you enter to set up a link in your tf-login-button
tag that points to the /oauth/authorize
endpoint for your app.
Read our Applications guide to create your own applications that integrate with Typeform's APIs. For inspiration, check out what other open-source developers are doing on our Community projects page.
To directly access Typeform's APIs (for example, using cURL or Postman), learn how to get a personal access token and start making requests.