Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

RollableTable Item avatar does not work when setting via API

I'm creating a new rollable table item via api. &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; const table = getRollableTableForName(rollableTableName); &nbsp;&nbsp;&nbsp; const image = getImgSrcForId(tokenId); &nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; if(table == null || image == null) &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; return; &nbsp;&nbsp;&nbsp; // Create new entry, reference table &nbsp;&nbsp;&nbsp; const ob = createObj("tableitem", { &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _type: "tableitem", &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _rollabletableid:table.get("_id"), &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; avatar: imgsrc, &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; name: generateGUID(), &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; weight:1 &nbsp;&nbsp;&nbsp; }); The image is a string that is I obtain from a token on the whiteboard. It matches&nbsp; '<a href="https://s3.amazonaws.com/files.d20.io/marketplace/44744/e0KcECTpGT2fB1dxLmdz3Q/max.png?1234567890" rel="nofollow">https://s3.amazonaws.com/files.d20.io/marketplace/44744/e0KcECTpGT2fB1dxLmdz3Q/max.png?1234567890</a> So it should be valid. The created item is also visible in the rollable table via the gui yet there avatar is empty. The API doc says that one cannot reference marketplace items yet when I add a table item via gui and then read the avatar via API, the url is still a marketplace url. So I assume this is a bug.
1518483083
Stephen Koontz
Forum Champion
Marketplace Creator
Sheet Author
API Scripter
Compendium Curator
The API does not have access to marketplace images, only images from your library.&nbsp;