Help

The Community will be temporarily unavailable starting on Friday February 28. We’ll be back as soon as we can! To learn more, check out our Announcements blog post.

Fetching data with airtable-php script gives me NULL

1771 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