Class OAuthTokenRequest

java.lang.Object
com.slack.api.methods.request.oauth.OAuthTokenRequest
All Implemented Interfaces:
SlackApiRequest

public class OAuthTokenRequest extends Object implements SlackApiRequest
Exchanges a temporary OAuth verifier code for a workspace token.

- https://api.slack.com/methods/oauth.token - https://api.slack.com/docs/oauth

  • Method Details

    • getToken

      public String getToken()
      Description copied from interface: SlackApiRequest
      Returns a token in this request object. If the API endpoint does not require a token (e.g., api.test), this method can return null.
      Specified by:
      getToken in interface SlackApiRequest
      Returns:
      token string value or null
    • builder

    • getClientId

      public String getClientId()
      Issued when you created your application.
    • getClientSecret

      public String getClientSecret()
      Issued when you created your application.
    • getCode

      public String getCode()
      The `code` param returned via the OAuth callback.
    • getRedirectUri

      public String getRedirectUri()
      This must match the originally submitted URI (if one was sent).
    • isSingleChannel

      public boolean isSingleChannel()
      Request the user to add your app only to a single channel.
    • setClientId

      public void setClientId(String clientId)
      Issued when you created your application.
    • setClientSecret

      public void setClientSecret(String clientSecret)
      Issued when you created your application.
    • setCode

      public void setCode(String code)
      The `code` param returned via the OAuth callback.
    • setRedirectUri

      public void setRedirectUri(String redirectUri)
      This must match the originally submitted URI (if one was sent).
    • setSingleChannel

      public void setSingleChannel(boolean singleChannel)
      Request the user to add your app only to a single channel.
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object