Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const file = await shoply.tickets.picture("TICKET_ID", "NAME");
const text = await file.text();<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$file = $shoply->tickets->picture('TICKET_ID', 'NAME');
$file->save('export');
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
file = client.tickets.picture("TICKET_ID", "NAME")
file.save("export")
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/support-tickets/{ticketId}/pictures/{name} \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/support-tickets/{ticketId}/pictures/{name}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.shoply.gg/v1/stores/{storeId}/support-tickets/{ticketId}/pictures/{name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/support-tickets/{ticketId}/pictures/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Support Tickets
Get a ticket's picture
A picture sent in the conversation: a PNG, JPEG or WebP of up to 5 MB, read out of the picture itself when it was sent.
Needs the tickets.read permission (Read Support Tickets).
GET
/
stores
/
{storeId}
/
support-tickets
/
{ticketId}
/
pictures
/
{name}
Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const file = await shoply.tickets.picture("TICKET_ID", "NAME");
const text = await file.text();<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$file = $shoply->tickets->picture('TICKET_ID', 'NAME');
$file->save('export');
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
file = client.tickets.picture("TICKET_ID", "NAME")
file.save("export")
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/support-tickets/{ticketId}/pictures/{name} \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/support-tickets/{ticketId}/pictures/{name}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.shoply.gg/v1/stores/{storeId}/support-tickets/{ticketId}/pictures/{name}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/support-tickets/{ticketId}/pictures/{name}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body"<string>"{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Authorizations
A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...
Path Parameters
The store's ID. A key reaches the store it was made in: GET /key answers which.
The ticket, by its ID.
The picture's name, as the conversation has it.
Response
The file itself, not a JSON envelope.
The response is of type file.

