Downloading public data files (NAIP data) using Box API
CompletedI am trying to download data from https://nrcs.app.box.com/v/naip
There are thousands of large files and the UI can't be used except to download them one at a time.
I have paid for a Box account and am trying to use the API to download these files programmatically. With the API I can connect using my ClientId and ClientSecret. I can then navigate folders and view details of files, but when I try to download any file I get the error:
"status":403,"code":"access_denied_insufficient_permissions"
I am using a C# library, but have also simulated the same result using Postman and Curl. Here is are the meaningful parts of my C# code (the connection, and the attempt to download):
var ccgConfig = new CcgConfig(clientId: "{MyClientId}", clientSecret: "{MyClientSecret}")
{
EnterpriseId = "{MyEnterpriseId}"
};
await using var stream = await client.Downloads.DownloadFileAsync(fileId: "1455984229313", headers: new DownloadFileHeaders
{
Boxapi = "shared_link=https://nrcs.app.box.com/v/naip",
});
Note that I am not trying to download my own files. I am trying to get the satellite imagery posted to a public account by NAIP.
Please sign in to leave a comment.
Comments
1 comment