0.0.0
[ Base URL: codecombat.com/api ]
The English-language version of the API documentation has been migrated to Mintlify, and the API itself now has a Node.JS SDK, a Postman collection, and more. The version you are looking at now will likely still be mostly accurate, but new API changes might only be documented in the new documentation.
/api/users
return User resources.We currently do not have a way for you to create or set up your own API Client or OAuth Provider information. Please contact us directly to get started.
API routes must be called with Basic HTTP Authentication. You will receive a username (CLIENT_ID) and password (CLIENT_SECRET) upon creation of your API Client in our system. Provide those credentials with each API request.
url = 'https://codecombat.com/api/users'
json = { name: 'A username' }
auth = { name: CLIENT_ID, pass: CLIENT_SECRET }
request.get({ url, json, auth }, (err, res) => console.log(res.statusCode, res.body))
We strongly recommend using a secrets manager for storing your client secret. Plain text files like dotenv lead to accidental, costly leaks. Use Doppler for a developer-friendly experience. AWS and Google Cloud have native solutions as well.
To authenticate a user on CodeCombat through your service, you will need to use the below OAuth 2 process. CodeCombat will act as the client, and your service will act as the provider.
First, you will need to provide a trusted lookup URL and/or a token URL for the setup(See Client Setup above). Then the process from user account creation to log in will look like this:
id
) from your system which is saved to the user in our db.There is also a concrete example depicting the above process for better understanding. You can also refer to this diagram.