Class OAuthEndpointsApi
- java.lang.Object
-
- com.zendesk.sunshine_conversations_client.api.OAuthEndpointsApi
-
public class OAuthEndpointsApi extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description OAuthEndpointsApi()OAuthEndpointsApi(ApiClient apiClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidauthorize(java.lang.String clientId, java.lang.String responseType, java.lang.String state, java.lang.String redirectUri)Authorize This endpoint begins the OAuth flow.voidauthorize(java.lang.String bearerToken, java.lang.String clientId, java.lang.String responseType, java.lang.String state, java.lang.String redirectUri)Authorize This endpoint begins the OAuth flow.ApiClientgetApiClient()java.lang.ObjectgetToken(InlineObject inlineObject)Get Token This endpoint is used to exchange an authorization code for an access token.java.lang.ObjectgetToken(java.lang.String bearerToken, InlineObject inlineObject)Get Token This endpoint is used to exchange an authorization code for an access token.java.lang.ObjectrevokeAccess()Revoke Access This endpoint is used to revoke your integration’s access to the user’s Sunshine Conversations app.java.lang.ObjectrevokeAccess(java.lang.String bearerToken)Revoke Access This endpoint is used to revoke your integration’s access to the user’s Sunshine Conversations app.voidsetApiClient(ApiClient apiClient)
-
-
-
Constructor Detail
-
OAuthEndpointsApi
public OAuthEndpointsApi()
-
OAuthEndpointsApi
public OAuthEndpointsApi(ApiClient apiClient)
-
-
Method Detail
-
getApiClient
public ApiClient getApiClient()
-
setApiClient
public void setApiClient(ApiClient apiClient)
-
authorize
public void authorize(java.lang.String clientId, java.lang.String responseType, java.lang.String state, java.lang.String redirectUri) throws ApiExceptionAuthorize This endpoint begins the OAuth flow. It relies on a browser session for authentication. If the user is not logged in to Sunshine Conversations they will be redirected to the login page. If the user has many apps, they will first be prompted to select the one they wish to integrate with. They will then be presented with an Allow/Deny dialog, describing details of the access your integration is requesting.- Parameters:
clientId- Your integration’s unique identifier (required)responseType- For now the only acceptable value is code. (required)state- You may pass in any arbitrary string value here which will be returned to you along with the code via browser redirect. (optional)redirectUri- You may pass in a redirect_uri to determine which URI the response is redirected to. This URI must be contained in the list configured by your integration. If this option is not passed, the first URI present in the list will be used. (optional)- Throws:
ApiException- if fails to make API call
-
getToken
public java.lang.Object getToken(InlineObject inlineObject) throws ApiException
Get Token This endpoint is used to exchange an authorization code for an access token. It should only be used in server-to-server calls.- Parameters:
inlineObject- (required)- Returns:
- a
Object - Throws:
ApiException- if fails to make API call
-
revokeAccess
public java.lang.Object revokeAccess() throws ApiExceptionRevoke Access This endpoint is used to revoke your integration’s access to the user’s Sunshine Conversations app. Revoking access means your integration will no longer be able to interact with the app, and any webhooks the integration had previously configured will be removed. Calling this endpoint is equivalent to the user removing your integration manually in the Sunshine Conversations web app. Your integration’s `removeUrl` (if configured) will also be called when an integration is removed in this way.- Returns:
- a
Object - Throws:
ApiException- if fails to make API call
-
authorize
public void authorize(java.lang.String bearerToken, java.lang.String clientId, java.lang.String responseType, java.lang.String state, java.lang.String redirectUri) throws ApiExceptionAuthorize This endpoint begins the OAuth flow. It relies on a browser session for authentication. If the user is not logged in to Sunshine Conversations they will be redirected to the login page. If the user has many apps, they will first be prompted to select the one they wish to integrate with. They will then be presented with an Allow/Deny dialog, describing details of the access your integration is requesting.- Parameters:
bearerToken- a token to be used for this request (required)clientId- Your integration’s unique identifier (required)responseType- For now the only acceptable value is code. (required)state- You may pass in any arbitrary string value here which will be returned to you along with the code via browser redirect. (optional)redirectUri- You may pass in a redirect_uri to determine which URI the response is redirected to. This URI must be contained in the list configured by your integration. If this option is not passed, the first URI present in the list will be used. (optional)- Throws:
ApiException- if fails to make API call
-
getToken
public java.lang.Object getToken(java.lang.String bearerToken, InlineObject inlineObject) throws ApiExceptionGet Token This endpoint is used to exchange an authorization code for an access token. It should only be used in server-to-server calls.- Parameters:
bearerToken- a token to be used for this request (required)inlineObject- (required)- Returns:
- a
Object - Throws:
ApiException- if fails to make API call
-
revokeAccess
public java.lang.Object revokeAccess(java.lang.String bearerToken) throws ApiExceptionRevoke Access This endpoint is used to revoke your integration’s access to the user’s Sunshine Conversations app. Revoking access means your integration will no longer be able to interact with the app, and any webhooks the integration had previously configured will be removed. Calling this endpoint is equivalent to the user removing your integration manually in the Sunshine Conversations web app. Your integration’s `removeUrl` (if configured) will also be called when an integration is removed in this way.- Parameters:
bearerToken- a token to be used for this request (required)- Returns:
- a
Object - Throws:
ApiException- if fails to make API call
-
-