API Reference

Use the read method to retrieve access information for a specific file identified by a content identifier (CID).

try { const fileId = 'file_id_here'; // The ID of the file for which you want to retrieve access information. const cid = 'content_identifier_here'; // The content identifier (CID) for accessing the file. const [accessInfo, error] = await sdk.fileAccess.read({ fileId, cid }); // Check for success if (error) { console.error('Failed to retrieve access information:', error); } else { console.log('Access Information:', accessInfo); } } catch (error) { console.error('An unexpected error occurred:', error.message); }

Params

  • fileId (string): The ID of the file for which you want to retrieve access information.
  • cid (string): The content identifier (CID) for accessing the file.

Required API Key Permission

  • Read File