Actualiza a Pro

Versión de API 1.1

This documentation explain how to register, configure, and develop your app so you can successfully use our APIs

Crear Aplicación

Para que tu aplicación acceda a nuestras API, debes registrarla usando el Panel de Aplicaciones. El registro crea un ID de Aplicación que nos permite identificarte y diferenciar tu aplicación de otras.

  1. Necesitarás crear una nueva aplicación Crear Nueva Aplicación
  2. Una vez que crees tu aplicación, recibirás tu app_id y app_secret
Iniciar sesión con

Log in With system is a fast and convenient way for people to create accounts and log into your app. Our Log in With system enables two scenarios, authentication and asking for permissions to access people's data. You can use Login With system simply for authentication or for both authentication and data access.

  1. Para iniciar el proceso de inicio de sesión con OAuth, necesitas usar un enlace para tu aplicación como este:
    <a href="https://atozbuzz.com/api/oauth?app_id=YOUR_APP_ID">Log in With AtoZBuzz! Listado de Negocios Gratis</a>

    The user will be redirect to Log in With page like this

  2. Once the user accpeted your app, the user will be redirected to your App Redirect URL with auth_key como este:
    https://mydomain.com/my_redirect_url.php?auth_key=AUTH_KEY
    Esto auth_key valid only for one time usage, so once you used it you will not be able to use it again and generate new code you will need to redirect the user to the log in with link again.
Token de Acceso

Una vez que obtengas la aprobación del usuario para tu aplicación e inicie sesión con la ventana de inicio auth_key which means that now you are ready to retrive data from our APIs and to start this process you will need to authorize your app and get the access_token y puedes seguir nuestros pasos para aprender cómo obtenerlo.

  1. Para obtener un token de acceso, realiza una solicitud HTTP GET al siguiente endpoint como este:
    <?php
    $app_id = "YOUR_APP_ID"; // your app id
    $app_secret = "YOUR_APP_SECRET"; // your app secret
    $auth_key = $_GET['auth_key']; // the returned auth key from previous step
    
    $get = file_get_contents("https://atozbuzz.com/api/authorize?app_id=$app_id&app_secret=$app_secret&auth_key=$auth_key");
    
    $json = json_decode($get, true);
    if(!empty($json['access_token'])) {
        $access_token = $json['access_token']; // your access token
    }
    ?>
    Esto access_token valid only for only one 1 hour, so once it got invalid you will need to genarte new one by redirect the user to the log in with link again.
APIs

Una vez que obtengas tu access_token Now you can retrieve informations from our system via HTTP GET requests which supports the following parameters

Punto de acceso Descripción
api/get_user_info

obtener información del usuario

You can retrive user info like this

if(!empty($json['access_token'])) {
   $access_token = $json['access_token']; // your access token
   $get = file_get_contents("https://atozbuzz.com/api/get_user_info?access_token=$access_token");
}

El resultado será:

{
    "user_info": {
        "user_id": "",
        "user_name": "",
        "user_email": "",
        "user_firstname": "",
        "user_lastname": "",
        "user_gender": "",
        "user_birthdate": "",
        "user_picture": "",
        "user_cover": "",
        "user_registered": "",
        "user_verified": "",
        "user_relationship": "",
        "user_biography": "",
        "user_website": ""
    }
}