Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potentially found the solution to your Registrant Key issues, it's a Javascript problem! #15

Open
sethjamesofficial opened this issue May 10, 2021 · 1 comment

Comments

@sethjamesofficial
Copy link

Hi there, so I was playing with the API and I noticed something that, judging by comments you left in the repo, you have also noticed.

When using the test routes that display the JSON response, any call I tried to make using the registrant key given from the response to a registrant create call would fail with a 404 as if that registrant did not exist, which was very confusing since the API had just given me a response with the apparently incorrect key!

It was then that I noticed that, like the registrant keys in your comments, my registrant keys were also ending in a bunch of zeros.

I then looked at the raw response data and to my surprise, the registrant key that was in the raw response was NOT the same key that my browser was displaying!

It seems that the GoToWebinar API actually breaks a JSON standard by encoding this Registrant Key as an INT; the number is simply too big! Firefox was interperating the INT and simply rounding up the last few digits for whatever reason.

In further testing, it seems like the package works just fine in PHP land, the correct key is present in the response object. All that was broken was the way that Firefox chose to display the key, which led me to input the incorrect key when making subsequent calls.

This may be old news to you but I thought I would mention this here for anyone else that has had the same problem, as I suspect you may have judging by the comments left in the registrant routes file of the repo.

I would recommend perhaps mentioning this wierd little bug in the README as I'm sure I won't be the last person to spend way too long bashing their head against this issue!

@slakbal
Copy link
Owner

slakbal commented Jun 2, 2021

@sethjamesofficial thanks so much for this! Very interesting. I will take a look at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants