Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>GetGlue is switching/has switched to <a href="http://developer.getglue.com/#authentication" rel="nofollow">OAuth 2.0</a> for authentication. You might be more successful with it. The authentication flow follows <a href="http://tools.ietf.org/html/rfc6749#section-1.2" rel="nofollow">RFC 6749</a> closely.</p> <p>Once you registered your app on their <a href="https://api.getglue.com/oauth2/" rel="nofollow">OAuth 2.0 portal</a> and obtained a client id and secret, do something along the lines of:</p> <p>Load the authorize URL to let the user authorize your app:</p> <pre><code>// remove the line breaks! https://api.getglue.com/oauth2/authorize?response_type=code &amp;scope=public+read+write &amp;redirect_uri=http://localhost &amp;client_id=&lt;your OAuth client id&gt; </code></pre> <p>Once the user has authorized your app, GetGlue will redirect to the given redirect_uri with a code query parameter you have to intercept, e.g.</p> <pre><code>http://localhost&amp;code=&lt;auth code&gt; </code></pre> <p>Pass that code to the token endpoint to get an access token to append as a query parameter when accessing the v3 API:</p> <pre><code>// get tokens https://api.getglue.com/oauth2/access_token?client_secret=&lt;OAuth client secret&gt;&amp;grant_type=authorization_code&amp;redirect_uri=ttp://localhost&amp;code=&lt;auth code&gt;&amp;client_id=&lt;OAuth client id&gt; </code></pre> <p>If successful this will return some JSON. Be aware that they redirect from HTTPS to HTTP there. Some HTTP clients refuse to do this.</p> <pre><code>{ "token_type":"Bearer", "access_token":"&lt;an access token&gt;", "scope":"public read write", "expires_in":5184000, // in seconds from now "refresh_token":"&lt;a refresh token&gt;" } </code></pre> <p>Pass the access_token as a query parameter when making API calls. If the access_token has expired, call the token endpoint with the refresh_token as auth code to get a new one. If that fails, you have to make the user authorize your app again.</p> <p>There is also a <a href="https://github.com/UweTrottmann/getglue-java" rel="nofollow">Java library (getglue-java)</a> for the new API now.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload