I have a canvas app which uses the REST API to access salesforce data and I want to define/use a custom field on the Lead object. I found out how to add custom fields via the web interface via Customize -> Leads -> Fields, but I want to be able to do this programatically so that I can use the field for anyone that installs the app. As I understand it the REST API cannot do this and I will need to use the Metadata API.
Is the Metadata API the best/easiest way to define a custom field for use by my app?, If so can I authenticate with it using the signed request that Salesforce POSTs to my canvas app?, Finally can anyone point me to a simple example of how I might add a custom field using the Metadata API, ive looked into it a bit and im not exactly sure how it is supposed to work.