question

Andrew Prokop avatar image
Andrew Prokop asked Andrew Prokop commented

500 Internal Server Error on Glip Teams API call

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:\Users\ajprokop\OneDrive - Avaya\Documents\Projects\nodeJS\node_modules\@ringcentral\sdk\lib\http\Client.js:115:35)

at step (C:\Users\ajprokop\OneDrive - Avaya\Documents\Projects\nodeJS\node_modules\@ringcentral\sdk\lib\http\Client.js:56:23)

at Object.next (C:\Users\ajprokop\OneDrive - Avaya\Documents\Projects\nodeJS\node_modules\@ringcentral\sdk\lib\http\Client.js:37:53)

at fulfilled (C:\Users\ajprokop\OneDrive - Avaya\Documents\Projects\nodeJS\node_modules\@ringcentral\sdk\lib\http\Client.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'

}

rest api
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Phong Vu avatar image
Phong Vu answered Andrew Prokop commented

Looks like some issue in the sandbox. Let me check with the team.

1 comment
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Andrew Prokop avatar image Andrew Prokop commented ·

Thank you. Please let me know what you learn.

0 Likes 0 ·
Suyash Joshi avatar image
Suyash Joshi answered Andrew Prokop commented

Hi, @Andrew Prokop not sure if you are able to test this code in production. I was able to run it successfully using production credentials but I understand if you don't want to test in production your main app, you can create another test app and I can help you move it to production for testing purposes.

1 comment
1 |3000

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Andrew Prokop avatar image Andrew Prokop commented ·

Thanks, @Suyash Joshi At present, I cannot test this in production. I've worked around the issue so it's not holding me up. When I do go production, I will try again.

1 Like 1 ·

Developer sandbox tools

Using the RingCentral Phone for Desktop, you can dial or receive test calls, send and receive test SMS or Fax messages in your sandbox environment.

Download RingCentral Phone for Desktop:

Tip: switch to the "sandbox mode" before logging in the app:

  • On MacOS: press "fn + command + f2" keys
  • On Windows: press "Ctrl + F2" keys