title: Okta Sign-in Widget using Okta API
body: <p>I'm trying to use <a href="http://developer.okta.com/code/javascript/okta_sign-in_widget" rel="nofollow noreferrer">Okta's Sign-In Widget</a> and the Okta API to find out what groups a user is associated with.</p>
  
  <p>The Okta API which returns what groups a user is associated with but I'm only able to use this when I go to it from the admin console, so this must be based on a Okta admin session because if I don't I get this error: </p>
  
  <pre><code>{"errorCode":"E0000005","errorSummary":"Invalid session","errorLink":"E0000005","errorId":"oaeLznzzAC0QaaLJmjDEls5rA","errorCauses":[]}
  </code></pre>
  
  <p>How can I use the Okta Sign-In Widget and the "<a href="http://developer.okta.com/docs/api/resources/users.html#get-member-groups" rel="nofollow noreferrer">Get Member Groups</a>" API resource to redirect the user based on the group they are associated with?</p>