{"__v":0,"_id":"544945633acc37080099e719","category":{"__v":5,"_id":"53fe7d8daddab8973c1af2b1","pages":["53fe732eaddab8973c1af27f","53fe7df4addab8973c1af2b7","53fe7e08addab8973c1af2b9","544945633acc37080099e719","551c450c0360770d00f5ce3a"],"project":"53fe6dc5addab8973c1af267","version":"53fe6dc5addab8973c1af26a","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2014-08-28T00:53:33.662Z","from_sync":false,"order":5,"slug":"login-reference","title":"Login Reference"},"is_link":false,"parentDoc":null,"project":"53fe6dc5addab8973c1af267","user":"53fe70beaddab8973c1af273","version":{"__v":19,"_id":"53fe6dc5addab8973c1af26a","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"},"updates":[],"next":{"pages":[],"description":""},"createdAt":"2014-10-23T18:13:55.223Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"basic_auth":false,"try":true,"auth":"never","params":[],"url":""},"isReference":false,"order":4,"body":"You can test a successful login flow by using a test `code` and test `access_token`: \n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"$ curl --data \\\"app_id=ANY_APP_ID&app_secret=ANY_APP_SECRET&code=code_1234567890\\\" https://clef.io/api/v1/authorize\\n{\\n  \\\"access_token\\\": \\\"token_1234567890\\\",\\n  \\\"success\\\": true\\n}\\n\\n$ curl https://clef.io/api/v1/info\\\\?access_token\\\\=token_1234567890\\n{\\n  \\\"info\\\": {\\n    \\\"email\\\": \\\"alex:::at:::getclef.com\\\",\\n    \\\"first_name\\\": \\\"Alex\\\",\\n    \\\"id\\\": \\\"12345\\\",\\n    \\\"last_name\\\": \\\"Felk\\\",\\n    \\\"phone_number\\\": \\\"1234567890\\\"\\n  },\\n  \\\"success\\\": true\\n}\",\n      \"language\": \"shell\"\n    }\n  ]\n}\n[/block]","excerpt":"","slug":"testing-login","type":"basic","title":"Testing login"}
You can test a successful login flow by using a test `code` and test `access_token`: [block:code] { "codes": [ { "code": "$ curl --data \"app_id=ANY_APP_ID&app_secret=ANY_APP_SECRET&code=code_1234567890\" https://clef.io/api/v1/authorize\n{\n \"access_token\": \"token_1234567890\",\n \"success\": true\n}\n\n$ curl https://clef.io/api/v1/info\\?access_token\\=token_1234567890\n{\n \"info\": {\n \"email\": \"alex@getclef.com\",\n \"first_name\": \"Alex\",\n \"id\": \"12345\",\n \"last_name\": \"Felk\",\n \"phone_number\": \"1234567890\"\n },\n \"success\": true\n}", "language": "shell" } ] } [/block]