{"_id":"53ffad4623a37e1d5cebb03d","version":{"_id":"53fe6dc5addab8973c1af26a","__v":19,"project":"53fe6dc5addab8973c1af267","createdAt":"2014-08-27T23:46:13.941Z","releaseDate":"2014-08-27T23:46:13.941Z","categories":["53fe6dc5addab8973c1af26b","53fe71a2addab8973c1af276","53fe7d89addab8973c1af2b0","53fe7d8daddab8973c1af2b1","53fe836faddab8973c1af2ce","53ff9a4823a37e1d5cebafe1","53ff9e3723a37e1d5cebaff7","53ffaca523a37e1d5cebb039","53ffad2e23a37e1d5cebb03c","5400c7d2ec93b29b61d4f7be","5400f0e1ec93b29b61d4f7dd","54d5636323010a0d001aca81","54d565c1276f8e0d00feab54","54ff40532882a10d00546927","556606d25561af0d008208b7","558c91900b236c2500d37c9a","56180a14f8c9632100ac7599","564fb3a59b4fab1700187518","5702e2d2f2d6f336005e901f"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"parentDoc":null,"user":"53fe6d8baddab8973c1af266","category":{"_id":"53ffad2e23a37e1d5cebb03c","project":"53fe6dc5addab8973c1af267","version":"53fe6dc5addab8973c1af26a","__v":1,"pages":["53ffad4623a37e1d5cebb03d","53fe7dcaaddab8973c1af2b4","5400f162ec93b29b61d4f7e0"],"sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-08-28T22:29:02.077Z","from_sync":false,"order":4,"slug":"button-reference","title":"Button Reference"},"is_link":false,"project":"53fe6dc5addab8973c1af267","__v":16,"updates":["5490aa54af2f211600cf2c78"],"next":{"pages":[],"description":""},"createdAt":"2014-08-28T22:29:26.021Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","try":true,"auth":"never","params":[],"url":""},"isReference":false,"order":0,"body":"To create a new Clef application and get an App ID and App Secret used to complete Clef's OAuth handshake, visit our [developer portal](https://getclef.com/developer).\n\n# What is an *Application domain*? \n\nThe application domain is the domain where you'll be integrating Clef. So if I'm integrating Clef on my local development server, my application domain might be [http://localhost:8000](http://localhost:8000). If I'm integrating on a live site, it might be [http://mywebsite.com](http://mywebsite.com). \n\nThe **redirect URL** described in [Adding the Clef button](/v1.0/docs/adding-the-clef-button) must be on this domain. \n\n## Does the application domain support URL [match patterns](https://developer.chrome.com/extensions/match_patterns)?\n\nYes. The application domain *can* be a wildcard domain, following the [Google URL match pattern standard](https://developer.chrome.com/extensions/match_patterns) (but limited to http and https, and the path does not matter). \n\nFor instance, the following application domain settings are valid:\n\n* `http://example.com`\n    - ✓ `example.com`\n    - x `subdomain.example.com`\n    - x `sub.subdomain.example.com`\n* `http://*.example.com`\n    - x `example.com`\n    - ✓ `subdomain.example.com`\n    - ✓ `sub.subdomain.example.com`\n* `http://example.com, http//*.example.com`\n    - ✓ `example.com`\n    - ✓ `subdomain.example.com`\n    - ✓ `sub.subdomain.example.com`\n\n## Can I enter more than one URL for the application domain?\nYes.\n\nFor example, if you plan to develop your application on a local machine before pushing it live, your application domain might look like this: `http://example.com, http://localhost:8080`.\n\n# What is a *Logout hook*? \n\nThe logout hook is a URL on your website that Clef will request when a user logs out. For a full explanation of logout hooks, check out our [section on logout](/v1.0/docs/overview).\n\n## Can I enter more than one logout hook url?\n\nNo. Unlike the application domain setting, the logout hook url can only contain one URL. So, if you are testing on a staging site url, you will need to update the logout hook url when you push your site live.\n\n## Must logout hook urls point to a \"live\" server?\n\nYes, logout hooks only work on \"live\" servers (i.e., servers that are connected to the internet). So if you are developing your application on your localhost, Clef's logout hooks will not work until you push to a staging or production server and update the hook url accordingly.\n\n## Must logout hook urls be on the same domain as the application domain?\n\nYes. \n\n# What are *Permissions*? \n\nPermissions are user information that you'll receive when a user logs in with Clef to your website. Most sites ask for an email address to send transactional emails, but it isn't required to complete the Clef integration. \n\n# Next up\nOnce you've created a Clef application and generated an App ID and App Secret, it's time to [add the Clef button](/v1.0/docs/adding-the-clef-button) to your website.\n[block:html]\n{\n  \"html\": \"<div></div>\\n<a class=\\\"clef-button blue\\\" href=\\\"/v1.0/docs/adding-the-clef-button\\\">Go to the next section</a>\\n<style></style>\"\n}\n[/block]","excerpt":"In order to use Clef, you'll need to create a Clef application","slug":"creating-a-clef-application","type":"basic","title":"Creating a Clef application"}

Creating a Clef application

In order to use Clef, you'll need to create a Clef application

To create a new Clef application and get an App ID and App Secret used to complete Clef's OAuth handshake, visit our [developer portal](https://getclef.com/developer). # What is an *Application domain*? The application domain is the domain where you'll be integrating Clef. So if I'm integrating Clef on my local development server, my application domain might be [http://localhost:8000](http://localhost:8000). If I'm integrating on a live site, it might be [http://mywebsite.com](http://mywebsite.com). The **redirect URL** described in [Adding the Clef button](/v1.0/docs/adding-the-clef-button) must be on this domain. ## Does the application domain support URL [match patterns](https://developer.chrome.com/extensions/match_patterns)? Yes. The application domain *can* be a wildcard domain, following the [Google URL match pattern standard](https://developer.chrome.com/extensions/match_patterns) (but limited to http and https, and the path does not matter). For instance, the following application domain settings are valid: * `http://example.com` - ✓ `example.com` - x `subdomain.example.com` - x `sub.subdomain.example.com` * `http://*.example.com` - x `example.com` - ✓ `subdomain.example.com` - ✓ `sub.subdomain.example.com` * `http://example.com, http//*.example.com` - ✓ `example.com` - ✓ `subdomain.example.com` - ✓ `sub.subdomain.example.com` ## Can I enter more than one URL for the application domain? Yes. For example, if you plan to develop your application on a local machine before pushing it live, your application domain might look like this: `http://example.com, http://localhost:8080`. # What is a *Logout hook*? The logout hook is a URL on your website that Clef will request when a user logs out. For a full explanation of logout hooks, check out our [section on logout](/v1.0/docs/overview). ## Can I enter more than one logout hook url? No. Unlike the application domain setting, the logout hook url can only contain one URL. So, if you are testing on a staging site url, you will need to update the logout hook url when you push your site live. ## Must logout hook urls point to a "live" server? Yes, logout hooks only work on "live" servers (i.e., servers that are connected to the internet). So if you are developing your application on your localhost, Clef's logout hooks will not work until you push to a staging or production server and update the hook url accordingly. ## Must logout hook urls be on the same domain as the application domain? Yes. # What are *Permissions*? Permissions are user information that you'll receive when a user logs in with Clef to your website. Most sites ask for an email address to send transactional emails, but it isn't required to complete the Clef integration. # Next up Once you've created a Clef application and generated an App ID and App Secret, it's time to [add the Clef button](/v1.0/docs/adding-the-clef-button) to your website. [block:html] { "html": "<div></div>\n<a class=\"clef-button blue\" href=\"/v1.0/docs/adding-the-clef-button\">Go to the next section</a>\n<style></style>" } [/block]