Pinning Services API

Pinning Services API

Pinning Services API

The Pinning Services API is a standardized specification for developers who want to build applications on top of IPFS (opens in a new tab). It allows seamless integration with a pinning service without requiring knowledge of the service's unique API.

Endpoint

W3IPFS users looking to utilize the IPFS Pinning Services API can do so from the premium API endpoint: https://api.w3ipfs.aioz.network/api/psa/ (opens in a new tab)

Authentication

To authenticate with W3IPFS through the Pinning Services API spec, you'll need to obtain an access_token. To get this token, first, you need to call a GET API that sends a code to your registered email. After receiving the code, use Postman to make a POST request with this code to the following API endpoint to login and obtain the access token:

GEThttps://api.w3ipfs.aioz.network/api/auth/email_login/:email

Parameters

email* Your actual email address

Response

200: OK
{
  "message": "Send mail successfully. Please check your email to login!",
  "status": "success"
}
POSThttps://api.w3ipfs.aioz.network/api/auth/login

Body

email* Your actual email address
code* The code sent to your email

Response

200: OK
{
    "access_token": "JWT",
    "refresh_token": "JWT",
    "status": "success"
}

Using the IPFS CLI

To use the W3IPFS Pinning Service with the IPFS CLI (opens in a new tab), you can follow these steps:

  1. Add W3IPFS credentials: Before you can start pinning to the W3IPFS Pinning Service, you need to add your authentication credentials. Replace YOUR_AUTH_JWT in the following command with your actual JWT.
ipfs pin remote service add w3ipfs https://api.w3ipfs.aioz.network/api/psa/ YOUR_AUTH_JWT
  1. Pin a CID to W3IPFS: Once you have added the service, you can pin a CID to W3IPFS using the ipfs pin remote add command. Replace YOUR_CID with the CID you want to pin.
ipfs pin remote add --service=w3ipfs --name=<human-readable-name> YOUR_CID
  1. List successful pins: To see a list of successful pins on W3IPFS, you can use the following command:
ipfs pin remote ls --service=w3ipfs
  1. List pending pins: If you want to check the status of pending pins on W3IPFS, you can use the following command:
ipfs pin remote ls --service=w3ipfs --status=queued,pinning,failed
  1. Additional commands and help: For more commands and general help with the IPFS remote pinning feature, you can use the following command:
ipfs pin remote --help

See more extensive documentation in the IPFS Docs (opens in a new tab).