Tool to exchange an authorization code or refresh token for an OAuth2 access token. Use after obtaining an authorization code or when refreshing an expired token.
codestringAuthorization code returned from /oauth/authorize; required for initial exchange.
client_idRequiredstringOAuth client identifier.
subdomainstringBubble app subdomain (e.g., 'my-bubble-app').
grant_typestringMust be 'refresh_code' when exchanging a refresh token for a new access token. Note: Bubble uses 'refresh_code' instead of the standard OAuth 2.0 'refresh_token' value.
redirect_uriRequiredstringRedirect URI used during the authorization request.
client_secretRequiredstringOAuth client secret.
custom_domainstringCustom domain host (e.g., 'myapp.example.com').
refresh_tokenstringPreviously issued refresh token; required when grant_type='refresh_code'.
use_version_testbooleanWhether to target the '/version-test' environment when building the URL.
token_url_overridestringFull URL to the token endpoint. If provided, takes precedence over domain/subdomain/metadata-derived URL.
additional_body_fieldsobjectAdditional fields to include in the POST JSON body.
dataRequiredData from the action execution
errorstringError if any occurred during the execution of the action
successfulRequiredbooleanWhether or not the action execution was successful or not
API key connection. Risk level 2 of 5.
Free Action
No published Skills explicitly reference this Action yet.