{"_id":"5807cb096d47320f007a301b","category":{"_id":"5807813b6d24211900953b99","__v":0,"project":"5589ceae9883a40d00c433f3","version":"5589ceae9883a40d00c433f6","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-10-19T14:20:43.374Z","from_sync":false,"order":3,"slug":"invites","title":"Invites"},"user":"5542d87d795b590d001dc7ff","parentDoc":null,"__v":0,"project":"5589ceae9883a40d00c433f3","githubsync":"","version":{"_id":"5589ceae9883a40d00c433f6","__v":10,"project":"5589ceae9883a40d00c433f3","createdAt":"2015-06-23T21:25:02.865Z","releaseDate":"2015-06-23T21:25:02.865Z","categories":["5589ceaf9883a40d00c433f7","559ab19d2100d117005f1269","57d4a754899ab90e00105e5d","5807813b6d24211900953b99","5819154bf62fee0f00949855","5841d27cae05ac2500ba2680","5846c4ee5d064323007b1774","589e29c72793e937001c15c5","5cf0460e272f2c0014a80d17","5cf047bde14258005d7a374e"],"is_deprecated":false,"is_hidden":false,"is_beta":true,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"metadata":{"title":"","description":"","image":[]},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2016-10-19T19:35:37.844Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":0,"body":"Invites are useful for the following scenarios:\n\n* Invite someone to signup to your app or website.\n* Invite someone on behalf of one of your user's, e.g. to track and reward when one of your users successfully invites their friends to join your app.\n* Custom scenarios, such as securely inviting a user to access a shared document or join a team, are supported using the `invite.extras` property, for example by storing a document or team ID.\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"{\\n  \\\"id\\\": \\\"invt_LfbrvhnlUAyM1N\\\",\\n  \\\"token_raw\\\": \\\"invt_LfbrvhnlUAyM1N-ReHwpMKWj5NIY0pv3x0NcurW\\\",\\n  \\\"invite_url\\\": \\\"https://api.userkit.io/hosted_widget?app=app_6fa64vtE&invt=invt_LfbrvhnlUAyM1N-ReHwpMKWj5NIY0pv3x0NcurW\\\", \\n  \\\"app_id\\\": \\\"app_6fa64vtE\\\", \\n  \\\"from_user\\\": null, \\n  \\\"accepted\\\": false, \\n  \\\"expires_secs\\\": 604800, \\n  \\\"to_email\\\": \\\"jane.smith:::at:::example.com\\\", \\n  \\\"created\\\": 1476888188.08038, \\n  \\\"extras\\\": null, \\n  \\\"accepted_user\\\": null, \\n  \\\"accepted_date\\\": null\\n}\",\n      \"language\": \"json\",\n      \"name\": \"Newly created Invite\"\n    }\n  ],\n  \"sidebar\": true\n}\n[/block]\n\n[block:callout]\n{\n  \"type\": \"warning\",\n  \"body\": \"`token_raw` and `invite_url` should be handled carefully. Remember, anyone who has access to an invite-url or token can accept the invite.\\n\\nNote: These properties are only present at the time the invite is created. If you fetch an existing invite later on you won't have access to these properties.\"\n}\n[/block]","excerpt":"","slug":"invites-overview","type":"basic","title":"Invites overview"}
Invites are useful for the following scenarios: * Invite someone to signup to your app or website. * Invite someone on behalf of one of your user's, e.g. to track and reward when one of your users successfully invites their friends to join your app. * Custom scenarios, such as securely inviting a user to access a shared document or join a team, are supported using the `invite.extras` property, for example by storing a document or team ID. [block:code] { "codes": [ { "code": "{\n \"id\": \"invt_LfbrvhnlUAyM1N\",\n \"token_raw\": \"invt_LfbrvhnlUAyM1N-ReHwpMKWj5NIY0pv3x0NcurW\",\n \"invite_url\": \"https://api.userkit.io/hosted_widget?app=app_6fa64vtE&invt=invt_LfbrvhnlUAyM1N-ReHwpMKWj5NIY0pv3x0NcurW\", \n \"app_id\": \"app_6fa64vtE\", \n \"from_user\": null, \n \"accepted\": false, \n \"expires_secs\": 604800, \n \"to_email\": \"jane.smith@example.com\", \n \"created\": 1476888188.08038, \n \"extras\": null, \n \"accepted_user\": null, \n \"accepted_date\": null\n}", "language": "json", "name": "Newly created Invite" } ], "sidebar": true } [/block] [block:callout] { "type": "warning", "body": "`token_raw` and `invite_url` should be handled carefully. Remember, anyone who has access to an invite-url or token can accept the invite.\n\nNote: These properties are only present at the time the invite is created. If you fetch an existing invite later on you won't have access to these properties." } [/block]