When I attempt to create a Glip team, I receive the error below. This is the call I am making:
async function create_team() {
var endpoint = "/restapi/v1.0/glip/teams"
var params = {
public: true,
name: "API Created Team",
members: [{ email: "ajprokop@gmail.com" }, { email: "ajprokop@avaya.com" }],
description: "A place to meet"
}
try {
var resp = await platform.post(endpoint, params)
var jsonObj = await resp.json()
console.log(JSON.stringify(jsonObj))
} catch (e) {
console.log(e)
}
}
Error:
Error: 500 Internal Server Error
at Client.<anonymous> (C:UsersajprokopOneDrive - AvayaDocumentsProjects
odeJS
ode_modules@ringcentralsdklibhttpClient.js:115:35)
at step (C:UsersajprokopOneDrive - AvayaDocumentsProjects
odeJS
ode_modules@ringcentralsdklibhttpClient.js:56:23)
at Object.next (C:UsersajprokopOneDrive - AvayaDocumentsProjects
odeJS
ode_modules@ringcentralsdklibhttpClient.js:37:53)
at fulfilled (C:UsersajprokopOneDrive - AvayaDocumentsProjects
odeJS
ode_modules@ringcentralsdklibhttpClient.js:28:58)
at processTicksAndRejections (internal/process/task_queues.js:93:5) {
response: Response {
size: 0,
timeout: 0,
[Symbol(Body internals)]: { body: [PassThrough], disturbed: false, error: null },
[Symbol(Response internals)]: {
url: 'https://platform.devtest.ringcentral.com/restapi/v1.0/glip/teams',
status: 500,
statusText: 'Internal Server Error',
headers: [Headers],
counter: 0
}
},
request: Request {
size: 0,
timeout: 0,
follow: 20,
compress: true,
counter: 0,
agent: undefined,
originalBody: '{"public":true,"name":"API Created Team","members":[{"email":"ajprokop@gmail.com"},{"email":"ajprokop@avaya.com"}],"description":"A place to meet"}',
[Symbol(Body internals)]: {
body: <Buffer 7b 22 70 75 62 6c 69 63 22 3a 74 72 75 65 2c 22 6e 61 6d 65 22 3a 22 41 50 49 20 43 72 65 61 74 65 64 20 54 65 61 6d 22 2c 22 6d 65 6d 62 65 72 73 22 ... 97 more bytes>,
disturbed: false,
error: null
},
[Symbol(Request internals)]: {
method: 'POST',
redirect: 'follow',
headers: [Headers],
parsedURL: [Url],
signal: null
}
},
originalMessage: 'Response has unsuccessful status'
}