# List messages GET https://alsona.com/rest/accounts/{account_id}/inbox/linkedin/seats/{seat_id}/messages List Linkedin messages for a seat. Reference: https://api.alsona.com/api-reference/inbox/linkedin/messages/list-messages ## OpenAPI Specification ```yaml openapi: 3.1.0 info: title: collection version: 1.0.0 paths: /rest/accounts/{account_id}/inbox/linkedin/seats/{seat_id}/messages: get: operationId: list-messages summary: List messages description: List Linkedin messages for a seat. tags: - >- subpackage_inbox.subpackage_inbox/linkedin.subpackage_inbox/linkedin/messages parameters: - name: account_id in: path required: true schema: type: string - name: seat_id in: path required: true schema: type: string - name: X-API-KEY in: header required: true schema: type: string responses: '200': description: Response with status 200 content: application/json: schema: $ref: >- #/components/schemas/Inbox_Linkedin_Messages_List messages_Response_200 servers: - url: https://alsona.com components: schemas: RestAccountsAccountIdInboxLinkedinSeatsSeatIdMessagesGetResponsesContentApplicationJsonSchemaMessagesItems: type: object properties: body: type: string type: type: string seat_id: type: string ln_inbox: type: string direction: type: string last_name: type: string ln_degree: type: integer member_id: type: string thread_id: type: string account_id: type: string created_at: type: integer first_name: type: string message_id: type: string updated_at: type: integer delivered_at: type: integer required: - body - type - seat_id - ln_inbox - direction - last_name - ln_degree - member_id - thread_id - account_id - created_at - first_name - message_id - updated_at - delivered_at title: >- RestAccountsAccountIdInboxLinkedinSeatsSeatIdMessagesGetResponsesContentApplicationJsonSchemaMessagesItems Inbox_Linkedin_Messages_List messages_Response_200: type: object properties: success: type: boolean last_key: description: Any type messages: type: array items: $ref: >- #/components/schemas/RestAccountsAccountIdInboxLinkedinSeatsSeatIdMessagesGetResponsesContentApplicationJsonSchemaMessagesItems capacityUnits: type: number format: double required: - success - messages title: Inbox_Linkedin_Messages_List messages_Response_200 securitySchemes: apiKeyAuth: type: apiKey in: header name: X-API-KEY ``` ## SDK Code Examples ```python Response import requests url = "https://alsona.com/rest/accounts/account_id/inbox/linkedin/seats/seat_id/messages" headers = {"X-API-KEY": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript Response const url = 'https://alsona.com/rest/accounts/account_id/inbox/linkedin/seats/seat_id/messages'; const options = {method: 'GET', headers: {'X-API-KEY': ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Response package main import ( "fmt" "net/http" "io" ) func main() { url := "https://alsona.com/rest/accounts/account_id/inbox/linkedin/seats/seat_id/messages" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("X-API-KEY", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Response require 'uri' require 'net/http' url = URI("https://alsona.com/rest/accounts/account_id/inbox/linkedin/seats/seat_id/messages") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["X-API-KEY"] = '' response = http.request(request) puts response.read_body ``` ```java Response import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://alsona.com/rest/accounts/account_id/inbox/linkedin/seats/seat_id/messages") .header("X-API-KEY", "") .asString(); ``` ```php Response request('GET', 'https://alsona.com/rest/accounts/account_id/inbox/linkedin/seats/seat_id/messages', [ 'headers' => [ 'X-API-KEY' => '', ], ]); echo $response->getBody(); ``` ```csharp Response using RestSharp; var client = new RestClient("https://alsona.com/rest/accounts/account_id/inbox/linkedin/seats/seat_id/messages"); var request = new RestRequest(Method.GET); request.AddHeader("X-API-KEY", ""); IRestResponse response = client.Execute(request); ``` ```swift Response import Foundation let headers = ["X-API-KEY": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://alsona.com/rest/accounts/account_id/inbox/linkedin/seats/seat_id/messages")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```