{{apps_header}}

###
{{LANG developers}}

Our API allows you to retrieve informations from our website via GET request and supports the following query parameters:

Name | Meaning | Values | Description | Required
--- | --- | --- | --- | ---
type | Query type. | get_channel_info using fetch you can get user data | This parameter specify the type of the query. |

How to start?

1. Create a development application.
2. Once you have created the app, you'll get APP_ID, and APP_SECRET.
   Example:
3. To start the Oauth process, use the link {{CONFIG site_url}}/oauth?app_id={YOUR_APP_ID}
4. Once the end user clicks this link, he/she will be redirected to the authorization page.
5. Once the end user authorization the app, he/she will be redirected to your domain name with a GET parameter "code", example: http://yourdomain/?code=XXX
6. In your code, to retrieve the authorized user info, you need to generate an access code, please use the code below:
   1. PHP: `'; echo '

          ' . htmlspecialchars($code) . '

      '; ?>`
7. Once you got the access code, simple call the data you would like to retrieve, Example:
   1. PHP: `' . htmlspecialchars($code) . ''; ?>`
   2. Respond:

          Jsonoutput

          {
              "api_status": "200",
              "api_version": "1.0",
              "data":{
                  "id": ,
                  "username": "",
                  "email": "",
                  "first_name": "",
                  "last_name": "",
                  "gender": "",
              }
          }