Procore.Api.AuthenticationOAuth20Authentication (procore_sdk v0.3.0)
API calls for all endpoints tagged AuthenticationOAuth20Authentication
.
Summary
Functions
Grant App Authorization Creates and returns a temporary authorization code with 10 minute expiration. Note that all parameters listed below are required. This endpoint corresponds to the OAuth 2.0 authorization endpoint described in section 3.1 of the OAuth 2.0 RFC. See the Authentication Guide for additional information and authentication examples.
Revoke Token
Revoke authorization of an access token. The request must contain the body data as form-data. The authorization server responds with HTTP status code 200 if the token has been revoked successfully or if the client submitted an invalid token. Note that the Revoke Token endpoint revokes both the Access Token and Refresh Token. The client_secret
param is only required for confidential applications. Public applications using the implicit OAuth flow do not need to provide this parameter to revoke access tokens.
Get Token Info
Return access token details. See the Authentication Guide for additional information and authentication examples. The request must contain the access token in the Authorization header: Authorization: Bearer <YOUR_ACCESS_TOKEN>
Get or Refresh an Access Token Used to acquire a new access token or refresh an existing access token. Certain parameter combinations and values are used depending on which scenario you are handling. See the individual parameter descriptions for additional information. This endpoint corresponds to the token endpoint described in section 3.2 of the OAuth 2.0 RFC. See the Authentication Guide for additional information and authentication examples. JavaScript applications cannot make this request to get the access token or refresh token.
Functions
oauth_authorize_get(connection, response_type, client_id, redirect_uri, opts \\ [])
@spec oauth_authorize_get( Tesla.Env.client(), String.t(), String.t(), String.t(), keyword() ) :: {:ok, nil} | {:ok, Procore.Model.RestV10CompaniesCompanyIdWorkflowPermanentLogsGet401Response.t()} | {:error, Tesla.Env.t()}
Grant App Authorization Creates and returns a temporary authorization code with 10 minute expiration. Note that all parameters listed below are required. This endpoint corresponds to the OAuth 2.0 authorization endpoint described in section 3.1 of the OAuth 2.0 RFC. See the Authentication Guide for additional information and authentication examples.
Parameters
connection
(Procore.Connection): Connection to serverresponse_type
(String.t): Response type. Value should becode
for server apps,token
for client apps.client_id
(String.t): Client ID you were assigned when you registered your application.redirect_uri
(String.t): The URI that the user will be redirected to after they grant authorization to your application. For browser-based web applications, use ahttps://
web address. For "headless" applications useurn:ietf:wg:oauth:2.0:oob
.opts
(keyword): Optional parameters
Returns
{:ok, Procore.Model.RestV10CompaniesCompanyIdWorkflowPermanentLogsGet401Response.t}
on success{:error, Tesla.Env.t}
on failure
oauth_revoke_post(connection, procore_company_id, oauth_revoke_post_request, opts \\ [])
@spec oauth_revoke_post( Tesla.Env.client(), integer(), Procore.Model.OauthRevokePostRequest.t(), keyword() ) :: {:ok, map()} | {:ok, Procore.Model.RestV10CompaniesCompanyIdWorkflowPermanentLogsGet401Response.t()} | {:error, Tesla.Env.t()}
Revoke Token
Revoke authorization of an access token. The request must contain the body data as form-data. The authorization server responds with HTTP status code 200 if the token has been revoked successfully or if the client submitted an invalid token. Note that the Revoke Token endpoint revokes both the Access Token and Refresh Token. The client_secret
param is only required for confidential applications. Public applications using the implicit OAuth flow do not need to provide this parameter to revoke access tokens.
Parameters
connection
(Procore.Connection): Connection to serverprocore_company_id
(integer()): Unique company identifier associated with the Procore User Account.oauth_revoke_post_request
(OauthRevokePostRequest):opts
(keyword): Optional parameters
Returns
{:ok, map()}
on success{:error, Tesla.Env.t}
on failure
oauth_token_info_get(connection, opts \\ [])
@spec oauth_token_info_get( Tesla.Env.client(), keyword() ) :: {:ok, Procore.Model.RestV10CompaniesCompanyIdWorkflowPermanentLogsGet401Response.t()} | {:ok, Procore.Model.OauthTokenInfoGet200Response.t()} | {:error, Tesla.Env.t()}
Get Token Info
Return access token details. See the Authentication Guide for additional information and authentication examples. The request must contain the access token in the Authorization header: Authorization: Bearer <YOUR_ACCESS_TOKEN>
Parameters
connection
(Procore.Connection): Connection to serveropts
(keyword): Optional parameters
Returns
{:ok, Procore.Model.OauthTokenInfoGet200Response.t}
on success{:error, Tesla.Env.t}
on failure
oauth_token_post(connection, oauth_token_post_request, opts \\ [])
@spec oauth_token_post( Tesla.Env.client(), Procore.Model.OauthTokenPostRequest.t(), keyword() ) :: {:ok, Procore.Model.RestV10CompaniesCompanyIdWorkflowPermanentLogsGet401Response.t()} | {:ok, Procore.Model.OauthTokenPost200Response.t()} | {:error, Tesla.Env.t()}
Get or Refresh an Access Token Used to acquire a new access token or refresh an existing access token. Certain parameter combinations and values are used depending on which scenario you are handling. See the individual parameter descriptions for additional information. This endpoint corresponds to the token endpoint described in section 3.2 of the OAuth 2.0 RFC. See the Authentication Guide for additional information and authentication examples. JavaScript applications cannot make this request to get the access token or refresh token.
Parameters
connection
(Procore.Connection): Connection to serveroauth_token_post_request
(OauthTokenPostRequest):opts
(keyword): Optional parameters
Returns
{:ok, Procore.Model.OauthTokenPost200Response.t}
on success{:error, Tesla.Env.t}
on failure