Skip to main content
POST
/
v1
/
oauth2
/
authorize
/
mfa
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.Oauth2TokenAuthorizeMFARequest;
import org.openapis.openapi.models.operations.Oauth2TokenAuthorizeMFAResponse;

public class Application {

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

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

        Oauth2TokenAuthorizeMFARequest req = Oauth2TokenAuthorizeMFARequest.builder()
                .nextStepAuthId("auth_mfa_123abc")
                .verificationCode("123456")
                .build();

        Oauth2TokenAuthorizeMFAResponse res = sdk.oAuth2().authorizeMFA()
                .request(req)
                .call();

        if (res.object().isPresent()) {
            // handle response
        }
    }
}
{
  "next_step_auth_id": "auth_confirm_456def",
  "consent_required": 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
next_step_auth_id
string
required

Authorization session ID from /v1/oauth2/authorize

Example:

"auth_mfa_123abc"

verification_code
string
required

6-digit verification code sent to user's phone

Pattern: ^[0-9]{6}$
Example:

"123456"

Response

MFA verification successful

next_step_auth_id
string

Updated authorization session ID for next step

Whether user consent is required

client_name
string

Name of the OAuth2 client

scopes
string[]

List of requested scopes