Users can paste an external URL, create a new Koji from a template, or select an existing Koji from their profile.
Configure the returnType
to save the value as a URL or an object with the URL and additional metadata.
For example, add a link to the user’s favorite Koji or embed the Koji as a sticker.
{
"key": "koji",
"name": "My Koji",
"description": "This is my Koji",
"type": "koji",
"typeOptions": {
"returnType": "extended"
}
}
Specifies type of the returned value when a user selects a file. Set one of the following options:
url
– Returns a string with a URL that points to the file.
extended
– Returns an object with the URL and additional metadata about the file.
If returnType
is not specified, it defaults to extended
.
When returnType is set to extended, the saved object has the following structure.
{
"url": "string", (1)
"title": "string", (2)
"thumbnailUrl": "string", (3)
"description": "string", (4)
"sourceName": "string", (5)
"sourceThumbnailUrl": "string" (6)
}
url
– Full URL of the selected Koji or pasted link resource.
title
– Sharing metadata title (og:title
) of the content at the URL, if available.
thumbnailUrl
– Sharing metadata image (og:image
) of the content at the URL, if available.
description
– Sharing metadata description (og:description
) of the content at the URL, if available.
sourceName
– If the resource is a Koji, the Koji’s name, if available.
sourceThumbnailUrl
– If the resource is a Koji, the URL of the Koji’s thumbnail image, if available.