Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate AirTable API to use PAT instead of API Key #373

Open
LimesKey opened this issue Aug 30, 2024 · 0 comments
Open

Migrate AirTable API to use PAT instead of API Key #373

LimesKey opened this issue Aug 30, 2024 · 0 comments

Comments

@LimesKey
Copy link

I get INVALID_API_VERSION when trying to fetch records from Airtable using a personal access token, I assume this is because the program was never migrated to support PAT.

async fn get_airtable_records() -> Vec<Record<OnBoardRecord>> {
    let airtable = Airtable::new_from_env();
    // Get the current records from a table.
    let mut records: Vec<Record<OnBoardRecord>> = airtable
        .list_records(
            "Submissions",
            "Pending",
            vec!["OTP"],
        )
        .await
        .unwrap();

    // Iterate over the records.
    for (i, record) in records.clone().iter().enumerate() {
        println!("{} - {:?}", i, record);
    }
    return records;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant