Pinata Docs
Search…
Data Usage

Endpoint

/data/userPinnedDataTotal

Description

This endpoint returns the total combined size for all content that you've pinned through Pinata.

Type

GET

Headers

pinata_api_key: (put your personal pinata api key here)
pinata_secret_api_key: (put your personal pinata secret api key here)

OR

Authorization: Bearer (put your pinata JWT here)

Request Parameters

There are no request parameters for this endpoint.

Response

The response for this call will include the following values:
  • pin_count - The number of pins you currently have pinned with Pinata
  • pin_size_total - The total size of all unique content you have pinned with Pinata (expressed in bytes).
  • pin_size_with_replications_total - The total size of all content you have pinned with Pinata. This value is derived by multiplying the size of each piece of unique content by the number of times that content is replicated.
This value will be expressed in bytes.

Postman Example

JavaScript With Axios Example

In the javascript example below, we pass in our API keys from elsewhere (hopefully in a secure way).
1
const axios = require('axios');
2
3
export const userPinList = (pinataApiKey, pinataSecretApiKey) => {
4
const url = `https://api.pinata.cloud/data/userPinnedDataTotal`;
5
return axios
6
.get(url, {
7
headers: {
8
pinata_api_key: pinataApiKey,
9
pinata_secret_api_key: pinataSecretApiKey
10
}
11
})
12
.then(function (response) {
13
//handle response here
14
})
15
.catch(function (error) {
16
//handle error here
17
});
18
};
Copied!

We want your feedback!

Have a suggestion? Have a complaint? Confused about something in the documentation? Just want to say hi?
We want to make Pinata the best product available. That involves listening to our users and addressing their needs.
Send us an email at [email protected] and we'll see how we can help.
Last modified 3mo ago