XMTP Chat - remote attachment fetching

IMPORTANT: This post contains ideas intended to spark discussion and gather feedback. These are not final concepts and must not be interpreted as implementation details. For official information about how XMTP works, see the XMTP technical documentation. Have questions about this post? We’d love to hear from you—post a reply.

Before I get to my main point: XMTP chat has been a great tool for my dev process—having a first-party app to test against is invaluable. Thank you :raising_hands:

Today I started testing Remote Attachments (which I think I tested previously against the deprecated XMTP app). Things weren’t working, and it turns out the Pinata gateway you’re using returns an error.

URL: https://teal-binding-beaver-907.mypinata.cloud/ipfs/bafybeih4fwakqanikpy5sxxqr2rneyrpvnvsgqqc43xgu64poq2iscmayi

Error: “This content cannot be requested through the gateway you are using - ERR_ID:00024” (from Chrome)

If you replace the gateway with ipfs.io or https://gateway.pinata.cloud (though this one is rate-limited), everything works fine.

I think a heads-up should be added to xmtp.chat documentation for developers to use their own IPFS gateways, since the custom xmtp.chat gateway isn’t accessible outside the app. Devs trying to fetch content in their own apps will encounter errors that have nothing to do with their implementation.

This is assuming the gateway’s restricted access is intentional. If the gateway is meant to be public, then it’s misconfigured.

6 Likes