{ "opencollection": "1.0.0", "info": { "name": "CodeCombat Auth API", "version": "1.0" }, "items": [ { "info": { "name": "", "type": "folder" }, "items": [ { "info": { "name": "Add Oauth2 Identity", "type": "http" }, "http": { "method": "POST", "url": "https://codecombat.com/apiusers/:handle/o-auth-identities", "params": [ { "name": "handle", "value": "", "type": "path", "description": "The document's `_id` or `slug`." } ], "body": { "type": "json", "data": "{}" }, "auth": { "type": "basic", "username": "{{username}}", "password": "{{password}}" } }, "docs": "Adds an OAuth2 identity to the user, so that they can be logged in with that identity. You need to send the OAuth code or the access token to this endpoint. 1. If no access token is provided, it will use your OAuth2 token URL to exchange the given code for an access token. 2. Then it will use the access token (given by you, or received from step 1) to look up the user on your service using the lookup URL, and expects a JSON object in response with an `id` property. 3. It will then save that user" } ] } ], "bundled": true }