Ozone

Open Finance Malaysia Developer Portal

Token Exchange

Request

POST /token HTTP/1.1
Host: as1.sandbox.mya.ozoneapi.io
Content-Type: application/x-www-form-urlencoded
x-fapi-interaction-id: 968bed68-6694-44a8-8daa-b955bb4d1283

grant_type=authorization_code&
scope=accounts&
code=160ed384-bb0d-439e-85e8-68d2b681e45d&
redirect_uri=https://www.auth-app.ozoneapi.co.uk/redirect-url&
code_verifier=7ff8feab-c016-46f5-98e3-921e9c4556c4b25fedb6-f448-4f7a-9fde-cce1282f0626&
client_assertion_type=urn:ietf:params:oauth:client-assertion-type:jwt-bearer&
client_assertion=eyJhbGciOiJQUzI1NiIsImtp...<truncated-pk-jwt>

Decoded Private Key JWT

{
  "alg": "PS256",
  "kid": "CYMIwoZ1CUbkI0WhG1Km7Td8bU7V2DYEB3cXVHdGwAI"
}

Body

{
  "aud": "https://auth1.sandbox.mya.ozoneapi.io",
  "exp": 1769767012.739,
  "iss": "55aa605c-89ef-4473-aa88-47709f0ff383",
  "sub": "55aa605c-89ef-4473-aa88-47709f0ff383",
  "jti": "633bfebd-b960-4330-80c7-0f163a52c4e3",
  "iat": 1769766702.739
}

Response

200 OK
Content-Type: application/json; charset=utf-8
x-fapi-interaction-id: 968bed68-6694-44a8-8daa-b955bb4d1283

{
    "access_token": "26e0bf38-9fab-48e5-8be6-4a906905f959",
    "expires_in": 600,
    "token_type": "Bearer",
    "scope": "accounts profile",
    "state": "d0ba6086-ca86-43f9-9ec3-92326bceb490",
    "authorization_details": [
        {
            "type": "urn:openfinance-ml:account-access-consent:v1.2",
            "consent": {
                "consent_id": "a7cb03ff-4c70-4eaa-87f4-f2a4c4c87b0d",
                "dc_id": "16f87e367071230059bff09a",
                "dp_id": "DP9876543210",
                "consent_type": "urn:openfinance-ml:account-access-consent:v1.2",
                "consent_purpose": "pfm",
                "permissions": [
                    "read_accounts",
                    "read_transactions",
                    "read_balances"
                ],
                "expiration_datetime": "2026-11-30T23:59:59Z",
                "status": "authorized",
                "created_at": "2026-01-30T10:12:42.671Z",
                "updated_at": "2026-01-30T10:13:26.588Z",
                "updated_by": "data_provider_user",
                "accounts": [
                    {
                        "account_id": "100004000000000000000004",
                        "account_number": "10000004",
                        "account_name": "Greenbank Current Account"
                    },
                    {
                        "account_id": "100004000000000000000002",
                        "account_number": "10000002",
                        "account_name": "Greenbank Savings Account"
                    }
                ]
            }
        }
    ],
    "grant_id": "a7cb03ff-4c70-4eaa-87f4-f2a4c4c87b0d",
    "refresh_token": "2885e6a3-1486-4aa5-839f-ff879ba8a79a",
    "id_token": "eyJhbGciOiJQUzI1NiIs...<truncated-id_token>"
}

Decoded id_token

{
  "alg": "PS256",
  "kid": "U7hqOn8KlnoCvgkkH8o1A2w9DdHLjC25Y-_WeVhv0yE"
}

Body

{
  "sub": "202",
  "acr": "acr:paynet-sandbox",
  "amr": "mock",
  "name": "Mr. Mitsu Hirato",
  "given_name": "Mitsu",
  "family_name": "Hirato",
  "preferred_username": "mits",
  "email": "mits@m2.com",
  "email_verified": "true",
  "id_type": "passport",
  "hashed_id_number": "c17edaae86e4016a583e098582f6dbf3eccade8ef83747df9ba617ded9d31309",
  "iss": "https://auth1.sandbox.mya.ozoneapi.io",
  "aud": "55aa605c-89ef-4473-aa88-47709f0ff383",
  "iat": 1769768007,
  "exp": 1769768907,
  "nonce": "d578b737-53ec-465d-898d-d5c0323a6ae3",
  "auth_time": 1769768007,
  "azp": "55aa605c-89ef-4473-aa88-47709f0ff383"
}

Powered by ozoneapi

© 2026 Open Finance Malaysia Developer Portal. All rights reserved.