Client Credentials Grant Expiration Time

回答済み
新規投稿

コメント

3件のコメント

  • 正式なコメント
    jcleblanc

    Hi Wesley,

    That's correct, expires_in will be the time in seconds until token expiration. You can see more detail about the token object response over here.

    - Jon

    コメントアクション パーマリンク
  • Wesley Lee

    Thanks for the response Jon. Follow up question:

     

    The documentation you sent me has a refresh token as a part of the response payload, but mine does not. I am using the client credentials grant to obtain a JWT and the response looks like this:

     

    {"access_token":"<REDACTED>","expires_in":4102,"restricted_to":[],"token_type":"bearer"}

     

    How would I refresh this token once it expires?

     

    Thanks,

    0
    コメントアクション パーマリンク
  • jcleblanc

    Hi Wesley,

    The reference guide can be a bit confusing in this instance because it incorporates all possible options / values for all of our different auth types. Here's what you'll need to know for client credential grant.

    The payload that you're seeing doesn't include a refresh token, like what you would see within standard OAuth 2 (when a user signs in to grant your app permissions). With those app types you would call the refresh token endpoint using that refresh token.

    In your case, it's easier - when the token expires just call the same request access token endpoint that you did to get the first access token, which will give you a new one to use. 

    - Jon

    0
    コメントアクション パーマリンク

サインインしてコメントを残してください。