Spaces:
Sleeping
Sleeping
File size: 462 Bytes
a746d34 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
/**
* Retrieves image data from LINE and returns it as a blob.
* @return {Blob} Image data as a blob.
*/
function getLineImageData() {
var options = {
"method": "GET",
"headers": {
"Authorization": "Bearer YOUR_LINE_API_TOKEN"
}
};
var response = UrlFetch.fetch("https://api.line.me/v2/profile/picture", options);
var imageData = response.getContentText();
var blob = Utilities.newBlob(imageData, "image/jpeg");
return blob;
} |