{"action":"created","issue":{"url":"https://api.github.com/repos/JorgenPhi/php-snapchat/issues/72","labels_url":"https://api.github.com/repos/JorgenPhi/php-snapchat/issues/72/labels{/name}","comments_url":"https://api.github.com/repos/JorgenPhi/php-snapchat/issues/72/comments","events_url":"https://api.github.com/repos/JorgenPhi/php-snapchat/issues/72/events","html_url":"https://github.com/JorgenPhi/php-snapchat/issues/72","id":53332837,"number":72,"title":"accounts getting locked due to 3rd party usage.","user":{"login":"Snowlav","id":9736784,"avatar_url":"https://avatars.githubusercontent.com/u/9736784?v=3","gravatar_id":"","url":"https://api.github.com/users/Snowlav","html_url":"https://github.com/Snowlav","followers_url":"https://api.github.com/users/Snowlav/followers","following_url":"https://api.github.com/users/Snowlav/following{/other_user}","gists_url":"https://api.github.com/users/Snowlav/gists{/gist_id}","starred_url":"https://api.github.com/users/Snowlav/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Snowlav/subscriptions","organizations_url":"https://api.github.com/users/Snowlav/orgs","repos_url":"https://api.github.com/users/Snowlav/repos","events_url":"https://api.github.com/users/Snowlav/events{/privacy}","received_events_url":"https://api.github.com/users/Snowlav/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-01-04T10:46:21Z","updated_at":"2015-01-04T14:38:52Z","closed_at":null,"body":"Hey everyone, \r\n\r\nStrangely enough I still face this issue, even with the new endpoints, headers and parameters.\r\nAnyone here that can shed some light on why and how snapchat detects this?\r\nHow to prevent it?\r\n\r\nI figured a temporary fix would be to save auth token and keep logging in with that, because it seems to happen after like X amount of times that you login using 3rd party code."},"comment":{"url":"https://api.github.com/repos/JorgenPhi/php-snapchat/issues/comments/68634899","html_url":"https://github.com/JorgenPhi/php-snapchat/issues/72#issuecomment-68634899","issue_url":"https://api.github.com/repos/JorgenPhi/php-snapchat/issues/72","id":68634899,"user":{"login":"cuonic","id":821228,"avatar_url":"https://avatars.githubusercontent.com/u/821228?v=3","gravatar_id":"","url":"https://api.github.com/users/cuonic","html_url":"https://github.com/cuonic","followers_url":"https://api.github.com/users/cuonic/followers","following_url":"https://api.github.com/users/cuonic/following{/other_user}","gists_url":"https://api.github.com/users/cuonic/gists{/gist_id}","starred_url":"https://api.github.com/users/cuonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cuonic/subscriptions","organizations_url":"https://api.github.com/users/cuonic/orgs","repos_url":"https://api.github.com/users/cuonic/repos","events_url":"https://api.github.com/users/cuonic/events{/privacy}","received_events_url":"https://api.github.com/users/cuonic/received_events","type":"User","site_admin":false},"created_at":"2015-01-04T14:38:52Z","updated_at":"2015-01-04T14:38:52Z","body":"Ok try sending a request just after login to (https://github.com/JorgenPhi/php-snapchat/wiki/API-v2-Research#phdevice)[/ph/device] with a random `device_token` (Here's an example one : `APA91bGtT3_CXpBk_q3qBGt8hutXkgQmA1S7RMtNpXz9pBU4Sjl4koU6p5B_caUmuA-7-L5YGfzFoAZfiPKlI_9eNm2gq9wstmw7kF99wlw4PKhEmreaOaCQZlXBmjaZmnATb0-QzJ42HfrB90mspi3ZmiQTHtOCwQ`)\r\n\r\nTaking a look at the internal analytics system (`sc-analytics.appspot.com/post_events` => Same IP as normal endpoint server), here is what is posted off :  \r\n````\r\n{\"batch_id\":\"3f5e253d-5267-4d70-ba6b-43d4da8cc407Snapchat811BetaNexus4Android17gzip1420154607671\",\"common_params\":{\"city\":\"Unimplemented\",\"country\":\"Unimplemented\",\"frien\r\nd_count\":71,\"latlon\":\"Unimplemented\",\"region\":\"Unimplemented\",\"sc_user_agent\":\"Snapchat/8.1.1 Beta (Nexus 4; Android 17; gzip)\",\"session_id\":\"00000000-0000-0000-0000-0000\r\n00000000\",\"user_id\":\"29JsoXPp25RFx/5yS4ddcoZr/cK3Miyy94MMvilIX7M\\u003d\\n\"},\"events\":[{\"event_name\":\"APP_OPEN\",\"event_params\":{\"intent_action\":\"null\",\"open_state\":\"NORMAL\"\r\n},\"event_timestamp\":1420154607663}]}\r\n````\r\n\r\nNo apparent authentication token linking directly to the Snapchat account, so maybe they look for network activity patterns, for example whenever you open the application the same endpoints are called in a specific order : \r\n\r\n1. feelinsonice-hrd.appspot.com/loq/login\r\n2. sc-analytics.appspot.com/post_events\r\n3. feelinsonice-hrd.appspot.com/loq/all_updates\r\n4. feelinsonice-hrd.appspot.com/bq/story_thumbnail (Multiple calls fetching all new story thumbnails)\r\n5. feelinsonice-hrd.appspot.com/ph/device\r\n6. feelinsonice-hrd.appspot.com/shared/description (Multiple calls fetching all shared story descriptions)\r\n7. feelinsonice-hrd.appspot.com/bq/story_blob (Multiple calls fetching all story media)\r\n8. feelinsonice-hrd.appspot.com/loq/conversations\r\n\r\nOr if not maybe because of the amount of logins the \"third party application\" does compared to the actual application, Snapchat on a phone has to login once, then the auth_token is valid until logged out or until a login occurs elsewhere, so logins don't happen often."}}