🤔Getting Started
Needed information on how to get started.
Making requests and the limitations of the API
Sadly, TuneIn has a same-origin policy, that forbids you to access the API via JavaScript. However, you are still able to make requests using cURL, Postman, or other such software. This means that you can use PHP and its command execution functions to have a fully web-based radio streaming experience (although server-sided) or a custom software client/app.
All requests are made to the Base-URI defined in the Introdcution section, with the endpoints respective path appended and HTTP method specified before the path.
Authentication & Security
Although TuneIn implemented a same-origin policy, they did not implement any authentication which means you can get started right away.
You need to specify the protocol that you want to use (HTTP/ HTTPS) since there is no automatic redirection to https even if you/the client can fully support an https connection.
Keep in mind that all URLs given as a response by the API will start with http://
no matter which protocol you requested. So you will need to replace http://
with https://
on your end to use HTTPS.
An example request using curl could look like the following:
API Responses
The API always responds with an XML Document which usually looks something like this if you made a valid request.
Alternative responses
Alternatively, you can add &render=json
to the end of the request and render it in the json format. By default you will get an XML document. Other types of rendering have not yet been found. Feel free to add those into the documentation.
Last updated