Create Record with Foreign Key - API c#


Hi chaps,

I’m using the API to add a new record to a table and getting stuck with a Foreign Key (Integer). I am using C# and the AirtableAPIClient Nuget Package.

This is where the code is tripping up:

            fields.AddField("Username", username);
            fields.AddField("Password", password);
            fields.AddField("Ref", Refs );

AirTable is returning a 422 error on the Refs field. The foreign key is a single link, not multiple. The column itself is a LongInt. I’ve tried adding an array, a single value, but not having any luck with this. Can someone please advise?



Fixed, I needed to activate typecast and send the value over as a string instead of integer