1. Telebroad | Support Center
  2. Solution home
  3. Legacy API Documentation
  4. REST API - GET Requests
Open navigation

GET/download/mailbox/greeting (Legacy)

  Articles in this support section discuss Telebroad's legacy APIs. To learn about the current version of Telebroad APIs, which offer additional authentication options and support for advanced features, please go to https://developers.telebroad.com/.



Function and Response Fields


The GET/download/mailbox/greeting request returns a base64 text string representing an audio file, in WAV format, for one of the four possible mailbox greetings. You can convert this string to an actual audio file using any online base64 converting tool. 


The TeleConsole does not have a default generic greeting when an account is created. For the request to work, an actual greetings must have been recorded, generated, or uploaded by either the web interface, mobile app, or the POST/upload/mailbox/greeting API request.


The returned response is typical for a media file and includes the following fields:


  • name - the name of the audio file on the Telebroad server. It usually contains the type of the greeting. This is not so much relevant to converting the Base64 data to an actual audio, but can be useful when uploading new greetings.

  • data - the actual Base64 text string representing the WAV format audio file of the requested greeting.

  • mimetype - definition of the type/format of the media file. This will always be "audio\/x-wav".

Parameters


All parameters go in the header. 


ParameterTypeOperation
mailboxstringSpecify the number of the mailbox for which to get the greeting downloaded, if the user has more than one mailbox 
typestringThere are four different types of possible greetings that a caller will hear when they has reached your mailbox.

You can only get a response for one greeting type at a time. You will have to send separate requests for additional types!

The greeting type must be in all lower-case or you will get a "_invalid_greeting_type_" error.

greet - the greeting will be played if you are not answering the call. It will have priority and be played if no other greeting has been recorded.


unavail - if you are not answering but the "greet" greeting has not been set up by any method (recording, AI voice, upload, or API), then the system will play this instead, saying your name followed by "is unavailable".

temp - temporary greeting is played if you are unreachable, like when you are logged out of all your queues or toggled your availability status to Do not disturb.

Busy - busy greeting is played if you are already taking another call. 

Example


To get the "temp" greeting for mailbox 201 use this syntax:


HTTPS method: GET


webserv.telebroad.com/api/teleconsole/rest/download/mailbox/greeting?type=temp&mailbox=201


Response:


 The returned data field may be dozens of pages long. Shown here is a truncated version.


{ 

    "error": null, 

    "result": 

        { "name": "1113834_busy.wav", 

        "data":"UklGRtZKAABXQVZFZm10IBAAAAABAAEAQB

                    8AAIA+AAACABAAZGF0YbJKAAABAJMArgAs

                    APX\/EgALACoAtAAMAA8AHgCBANQANAB+

                    \/8X\/of9zABgBZgDk\/wIAZAAjAGgA5v8ZAK

                    b\/HQA\/AZAAev+4\/8z\/hf8F\/6H\/RwAg\/

                    17\/qf8v\/yv\/3\/8RANH\/WQCrAU4BDgA+\

.

.

.

                    AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA

                    AAAAAAAA=", 

                    "mimetype": "audio\/x-wav" } 

}



If the greeting has not been set up by any method (recording, upload, or API) than an error will be returned instead -


{

    "error": {

        "code": 444,

        "message": "Not found"

        }

}