cancel
Showing results for 
Search instead for 
Did you mean: 
karenvc
Active Contributor

Unable to connect to API for GoToWebinar after ResponseKey

Hello
 
I am trying to connect to the API for GoToWebinar.  I will soon be working on a project to connect a corporate website to their webinar account and have been familiarising myself this week.  However, I only get as far as the response key.  I have had the following issues in various methods:
 
Method 1 : Postman 
 
I have the responseKey from a browser GET request.  I build the POST header for the access token (including building the base64 as per instructions).  However, although I check everything carefully I get the following:
 
{"error":"invalid_request","error_description":"Required parameter(s) missing or wrong."}
 
Below is the code generator display in Postman for this.
 
curl -X POST \
  -H 'Accept: application/json' \
  -H 'Authorization: Basic {authorization code}
  -H 'Content-Type: application/x-www-form-urlencoded' \
-d 'grant_type=authorization_code&code={responseKey}'
 
The only difference from your sample is single quotes.  
 
Would this make a difference.  I can't see how to get Postman to use single quotes.  Other than that it appears the same.
 
Method 2 :  RestSharp from within Visual studio
 
        public string Authorise()
        {
            RestClient client = new RestClient("https://api.getgo.com/oauth/v2/token");
            client.Timeout = -1;
            var request = new RestRequest(Method.POST);
            request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
            request.AddHeader("Accept", "application/json");
            request.AddHeader("Authorization", "Basic {authorization code}");
            request.AlwaysMultipartFormData = true;
            request.AddParameter("grant_type", "authorization_code");
            request.AddParameter("code", "{responseKey}");
            IRestResponse response = client.Execute(request);
            return response.Content;
        }
 
When I call this method from a C# webforms page I get the same response:
 
{"error":"invalid_request","error_description":"Required parameter(s) missing or wrong."}
 
Method 3:  .Net SDK 
 
With this method I did actually get an Access token returned (or I think it is).  However, to test this I then went to run a method from the GoToWebinar API through the SDK but any methods seem to require an organizer key which I didn't have returned with the access token.
 
Your page below regarding using the SDK does not say how to get an organizer key.
 
 
I can't see anything within the documentation.  Is there a way to do this through the SDK or does it require one of the methods above (but then I have the issue stated of course).
 
I have, of course, been through the page:
 
but these are steps I have already tried with results as above.
 
I would appreciate any advice. Thank you.
7 REPLIES 7
AshC
LogMeIn Contributor

Re: Unable to connect to API for GoToWebinar after ResponseKey

Hi Karen, please reference this API Support Template for further assistance: https://goto-developer.logmeininc.com/api-support-request-template 

 

Slimpaul
New Contributor

Re: Unable to connect to API for GoToWebinar after ResponseKey

Can you share the solution? I have the same problem and it's a bummer that all google results ends here where the bot says "send us a mail" and not just the answer was answered to help future users...

karenvc
Active Contributor

Re: Unable to connect to API for GoToWebinar after ResponseKey

Looking back at my emails I don't believe I ended up contacting support with the same request as on this forum.

 

We decided to concentrate on the SDK method and have built our solution around that.

 

I hope this helps.

 

Slimpaul
New Contributor

Re: Unable to connect to API for GoToWebinar after ResponseKey

Thank you for the response.

I will take a look at the SDK solution.

 

Well I just noticed that the new SDK also work with the new oauth methiod .. with a popup and think.

Why is the direct login method not possible anymore? 

I just want to make a API request server side. There is no user who can click on a link and log in to gotowebinar because its a visitor of our website.

karenvc
Active Contributor

Re: Unable to connect to API for GoToWebinar after ResponseKey

We asked a similar question at the time and this was the response from GtW:

 

Yes, tokens can only be obtained via OAuth Code Grant Flow now. When a user registers for a webinar on your site, they don't need to use their own token (if they even have one) to do so. Your app is the one creating the webinar via API, correct? If so, you just need to keep your refresh token stored and refresh the access token as needed to create registrants. If I am off in my thinking of how your application works, please correct me 

 

I don't know if this helps.

Slimpaul
New Contributor

Re: Unable to connect to API for GoToWebinar after ResponseKey

So the flow would be.

Auth Token > Access token > store the refresh token somewhere and use it in future.

 

Well then now I just need to know why I always get invalid_request when I try to get the acces token 😕

 

 

majdouline
New Contributor

Re: Unable to connect to API for GoToWebinar after ResponseKey

hello @karenvc please if you find a solution share it with us and thank you