Skip to main content
POST
/
v1
/
oauth2
/
authorize
Java (SDK)
package hello.world;

import java.lang.Exception;
import org.openapis.openapi.AriesJava;
import org.openapis.openapi.models.errors.ErrorResponse;
import org.openapis.openapi.models.operations.Oauth2AuthorizeRequest;
import org.openapis.openapi.models.operations.Oauth2AuthorizeResponse;

public class Application {

    public static void main(String[] args) throws ErrorResponse, Exception {

        AriesJava sdk = AriesJava.builder()
                .bearerAuth(System.getenv().getOrDefault("BEARER_AUTH", ""))
            .build();

        Oauth2AuthorizeRequest req = Oauth2AuthorizeRequest.builder()
                .email("user@example.com")
                .password("SecurePassword123!")
                .clientId("client_abc123xyz")
                .redirectUri("https://yourapp.com/callback")
                .scope("read write")
                .state("random_state_string_123")
                .build();

        Oauth2AuthorizeResponse res = sdk.oAuth2().authorize()
                .request(req)
                .call();

        if (res.object().isPresent()) {
            // handle response
        }
    }
}
{
  "next_step_auth_id": "auth_mfa_123abc",
  "is_mfa": true,
  "client_name": "My Application",
  "scopes": [
    "read",
    "write"
  ]
}

Documentation Index

Fetch the complete documentation index at: https://finance.dev/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json
email
string<email>
required

User's email address

Example:

"user@example.com"

password
string<password>
required

User's password

Example:

"SecurePassword123!"

client_id
string
required

OAuth2 client identifier

Example:

"client_abc123xyz"

redirect_uri
string<uri>
required

Redirect URI registered with the client

Example:

"https://yourapp.com/callback"

response_type
string
default:code

OAuth2 response type

Example:

"code"

scope
string

Space-separated list of requested scopes

Example:

"read write"

state
string

Opaque value to maintain state between request and callback (CSRF protection)

Example:

"random_state_string_123"

code_challenge
string

PKCE code challenge (base64url encoded)

Example:

"E9Melhoa2OwvFrEMTJguCHaoeK1t8URWbuGJSstw-cM"

code_challenge_method
enum<string>

PKCE challenge method

Available options:
S256,
plain
Example:

"S256"

sid
string

Session ID for RSA encryption

Example:

"session_xyz789"

Response

Authorization initiated successfully

next_step_auth_id
string

Authorization session ID for next step

is_mfa
boolean

Whether MFA is required

Whether user consent is required

client_name
string

Name of the OAuth2 client

scopes
string[]

List of requested scopes