Help

Fetching data with airtable-php script gives me NULL

1367 0
cancel
Showing results for 
Search instead for 
Did you mean: 
AirtableUser1
4 - Data Explorer
4 - Data Explorer

Hello,

Can anyone help me?

I'm trying to get the data from Airtable by using this script

https://github.com/sleiman/airtable-php

Here's the code

<?php
require 'vendor/autoload.php';

$apiKey = 'tokenFromAirTableMyAccountSection';
$database = 'AirtableTest';
$tableName = 'Data';

use TANIOS\Airtable\Airtable;

$airtable = new Airtable(array(
    'api_key'   => $apiKey,
    'base'      => $database,
));

$request = $airtable->getContent( $tableName );

do {

    $response = $request->getResponse();

    var_dump( $response[ 'records' ] );

}
while( $request = $response->next() );

after all that I'm just getting NULL.

Any help would be much appreciated.

Thanks.

0 Replies 0