Skip to main content
Solved

AirTable PHP using new Personal Token

  • February 12, 2024
  • 2 replies
  • 221 views

Forum|alt.badge.img+9

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

I have been using this tool flawlessly and working my new Personal Token where my API key existed.

use \TANIOS\Airtable\Airtable;
$airtable = new Airtable(array(
    'api_key' => 'API_KEY',
    'base'    => 'BASE_ID'
));

When I swap out the API_KEY with my new Personal Token it doesn't work, which I suspected. What do I need to change api_key to? Is it that simple I hope! Thanks in advance!- Jon

Best answer by GavinA

@Jon_Eynon You are correct in that you can just swap them. Have you set the correct scopes for the personal access token? 

Checkout this guide for some examples.

2 replies

GavinA
Forum|alt.badge.img+15
  • Inspiring
  • Answer
  • February 13, 2024

@Jon_Eynon You are correct in that you can just swap them. Have you set the correct scopes for the personal access token? 

Checkout this guide for some examples.


Forum|alt.badge.img+9
  • Author
  • Inspiring
  • February 13, 2024

@Jon_Eynon You are correct in that you can just swap them. Have you set the correct scopes for the personal access token? 

Checkout this guide for some examples.


I was only using the first 12 digits on the personal token and not the full string. In addition, I needed to clear the cache from the server running the scripts. It was picking up the new token string. Issue solved!