Glance Voice Services

Service Endpoints

The Glance service endpoint has the following format:

soap https://voice.glance.net/services/voice.svc/RequestName
REST https://voice.glance.net/services/voice/RequestName

The request "accept-type" header determines the response format for REST requests:

Accept : application/json
Accept : application/xml

The default response format is json.

The services can only be accessed securely over https.

/services/voice/SetupCall

SetupCall allocates a phone number and PIN for a conference call. A pool of phone numbers may be configured for the group.

Parameters:

  • groupid (integer)
  • apikey (secret api key configured for the group)
  • pin, up to 20 digits (must be numeric)

Returns json with:

  • name: Conference name
  • number: An available phone number
  • pin: The supplied pin, or a randomly generated one
  • accessToken: Token for authenticating the SDK with the service
  • status: "ok", "error", ...
  • message: A descriptive error message for status codes other than "ok"

Examples:

GET https://voice.glance.net/services/voice.svc/rest/SetupCall?groupid=72&apikey=APIKEY&pin=333 HTTP/1.1
Host: voice.glance.net
Connection: keep-alive
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36
Upgrade-Insecure-Requests: 1

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: application/json; charset=utf-8
Date: Fri, 13 Oct 2017 21:19:40 GMT
Content-Length: 97

{"status":"ok","accessToken":"xyz","groupid":72,"name":"72-17816453248-333","number":"17816453248","pin":"333"}

Error reporting:

The response contains a "soap fault" or json error object for errors which indicate there is some coding error such as:

  • unexpected exception thrown in the service code itself (http status 500)

  • an input parameter passed into the service is out of range or otherwise invalid (http status 400)

  • authentication is missing or invalid or does not authorize the requested service (http status 403).

There are also error conditions which can be expected such as "subscription expired" which is reported in a "status code" and "message" as part of a normal response.

Example error responses:

GET /services/voice.svc/rest/SetupCall?groupid=1268&apikey=BADAPIKEY&pin=123456 HTTP/2
Host: voice.glance.net
Accept: application/json

HTTP/2 403
content-type: application/json; charset=utf-8
content-length: 76

{"code":"AuthenticationFailed","message":"Invalid API key","status":"error"}

GET /services/voice.svc/rest/SetupCall?groupid=1268&apikey=APIKEY&pin=abcdef HTTP/2
Host: voice.glance.net
Accept: application/json

HTTP/2 400
content-type: application/json; charset=utf-8
content-length: 105

{"code":"InvalidParameter","message":"Invalid pin parameter.  Only digits are allowed.","status":"error"}

By continuing to use the site, you agree to the use of cookies. Learn More