If you're new to using REST APIs, this guide should help you get started with making basic requests. It provides reference implementations for fetching data from our API by using the User Profile API as an example.
Our code examples are available in JavaScript and PHP (change language in the top right).
Reference Implementations
JavaScript
Here is our reference implementation for fetching data with JavaScript. You will need to change the values of YOUR_KEY and USERNAME.
$.get("https://api.tc-gaming.co.uk/citydriving/profile/get", { key:'YOUR_KEY', username:'USERNAME' }).done(function(data) {// Do something with the returned dataconsole.log(data); }).fail(console.log('Error fetching data!\nMake sure you have set your API key and parameters.'));
PHP
Here is our reference implementation for requesting data with PHP. You will need to change the values of YOUR_KEY and USERNAME.