Get Or Refresh An Access Token
get_or_refresh_an_access_tokenAcquire a new access token or refresh an existing one for Procore API authentication using OAuth 2.0. Required parameters: grant_type, client_id, client_secret.
Instructions
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 ... Use this to perform the get or action on Authentication records. Creates a new Authentication records and returns the created object on success (HTTP 201). Required parameters: grant_type, client_id, client_secret. Procore API: Platform - Developer Tools > Authentication. Endpoint: POST /oauth/token
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| grant_type | Yes | JSON request body field — use the value `authorization_code` when getting a new access token. Use `refresh_token` when refreshing an existing access token. Use `client_credentials` when using a Procore Service Account for a... | |
| client_id | Yes | JSON request body field — client ID you were assigned when you registered your application. | |
| client_secret | Yes | JSON request body field — client Secret you were assigned when you registered your application. | |
| code | No | JSON request body field — value of the `authorization_code` retrieved from the `/oauth/authorize` call. Only required when getting a new access code. | |
| redirect_uri | No | JSON request body field — the URI that the user will be redirected to after they grant authorization to your application. For browser-based web applications, use a `https://` web address. For "headless" applications use `ur... | |
| refresh_token | No | JSON request body field — the refresh token string. Only required when refreshing an access token. |