0

I'm trying to get registrant info from GoToWebinarApi (api link). First I'm making a request to get all registrants and getting the following response:

Response body

[
  {
    "firstName": "Test",
    "lastName": "t",
    "registrationDate": "2020-06-04T08:46:44Z",
    "timeZone": "Europe/Helsinki",
    "joinUrl": "https://global.gotowebinar.com/join/7649495216334202379/502991121",
    "registrantKey": 6700838782913279000,
    "email": "tes@gmail.com",
    "status": "APPROVED"
  }
]

After that I'm trying to use this registrant key to get registrant info in another query but persistently getting following response:

https://api.getgo.com/G2W/rest/v2/organizers/{{organizer_key}}/webinars/{{webinar_key}}/registrants/{{registrant_key}}
{
    "errorCode": "NotFound",
    "description": "Registrant with specified key does not exist",
    "incident": "3599905930306030349"
}

I don't know what's wrong, maybe it's a bug? It has a lot of stuff like this.

azimut3
  • 17
  • 8

1 Answers1

1

Have you tried downloading Postman and importing their collection? You can just fill in the fields and see if there's any issues. Removing the possibilities you made a mistake in your code.

https://documenter.getpostman.com/view/7571707/SVzw4fq2?version=latest#97d099de-e2b2-413c-96aa-d441d2db80c9

EDIT: Issue/Problem:

I've found the issue. Basically the numbers are too big for Javascript. See: JSON Response Long is Rounded or Corrupted and Large numbers erroneously rounded in JavaScript

Lud
  • 36
  • 1
  • 8
  • Thanks, but there was no code, I just copy/pasted request from their sandbox and tried to use just their plain sandbox. I believe they had some issues in their sandbox/playground or how it is called. – azimut3 Jul 01 '20 at 07:59
  • If you were trying code from their sandbox, did you just copy their code exactly or did you replace the registrant_key with the appropriate (an existing) value? – Lud Jul 02 '20 at 12:05
  • Yes, I used my actual data for API. Both in sandbox and in postman. I don't think it's the auth problem. And even if so, their error message then is totally wrong. – azimut3 Jul 03 '20 at 06:43
  • 1
    I've progressed my API implementation and I have the same issue. The ID returned is just wrong: e.g. I get 1558032573909537000 returned as RegistrantKey using the "get registrants" API endpoint. Then retrieving the registrant I get the above error. However if I go to Zapier and use "find registrant" and I select the webinar + type in the email of this registrant. It returns me the same registrant but the registrantKey is 1558032573909537035. The keys match except for the last 3 numbers. Using the latter actually works and doesn't give me an error. I don't know how zapier gets the right ID – Lud Jul 07 '20 at 15:45
  • 1
    I've found the issue. Basically the numbers are too big for Javascript. See: https://stackoverflow.com/questions/31622895/json-response-long-is-rounded-or-corrupted and https://stackoverflow.com/questions/1379934/large-numbers-erroneously-rounded-in-javascript – Lud Jul 14 '20 at 08:47