{"_id":"570ac6d2b044af0e0024f7b0","version":{"_id":"56abbf55f25f160d00e17f51","project":"56abbf55f25f160d00e17f4e","__v":12,"createdAt":"2016-01-29T19:36:53.665Z","releaseDate":"2016-01-29T19:36:53.665Z","categories":["56abbf56f25f160d00e17f52","56abca6bf9757e0d007c6650","56acddfa0ab3c00d00ce3332","56af65da9d32e30d0006d30f","56af66cab34d210d003d9ad0","56af6afcd21e9c0d00b628d1","56af6d6ecc4cbd0d00ce2c88","5705b12221cfed0e00e8c580","570a5676ade45d0e00c1ad33","570d7d25d1e4b82000d9e385","570eac3c3160d10e0041df0e","575709000fd6a3200010dded"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"user":"56abbec30b9e0b0d00616274","__v":3,"category":{"_id":"570a5676ade45d0e00c1ad33","__v":0,"project":"56abbf55f25f160d00e17f4e","version":"56abbf55f25f160d00e17f51","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2016-04-10T13:34:46.864Z","from_sync":false,"order":3,"slug":"client-side-api","title":"Client Side API"},"parentDoc":null,"project":"56abbf55f25f160d00e17f4e","updates":["597c150537f84b0014419470"],"next":{"pages":[],"description":""},"createdAt":"2016-04-10T21:34:10.036Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":true,"order":15,"body":"## Connecting\n\nThe `connect` function should be used as soon as you have access to the Kongregate API object in order to initialize the connection to our servers. For more information on initialization, see the [Client API Introduction](doc:client-api-introduction).\n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"Note\",\n  \"body\": \"This function only needs to be called when using the AS3 API, as the AS2 and JavaScript APIs will call it automatically. It is safe to call in other languages, but it will have no effect.\"\n}\n[/block]\n\n[block:code]\n{\n  \"codes\": [\n    {\n      \"code\": \"kongregate.services.connect();\",\n      \"language\": \"haxe\",\n      \"name\": \"ActionScript 3\"\n    }\n  ]\n}\n[/block]","excerpt":"Connect to to the back-end\n`connect()`","slug":"client-api-services-connect","type":"fn","title":"Services.Connect"}

Services.Connect

Connect to to the back-end `connect()`

## Connecting The `connect` function should be used as soon as you have access to the Kongregate API object in order to initialize the connection to our servers. For more information on initialization, see the [Client API Introduction](doc:client-api-introduction). [block:callout] { "type": "info", "title": "Note", "body": "This function only needs to be called when using the AS3 API, as the AS2 and JavaScript APIs will call it automatically. It is safe to call in other languages, but it will have no effect." } [/block] [block:code] { "codes": [ { "code": "kongregate.services.connect();", "language": "haxe", "name": "ActionScript 3" } ] } [/block]