Skip to content

Instantly share code, notes, and snippets.

@berkorbay
Created April 6, 2020 19:03
Show Gist options
  • Save berkorbay/d5fe5e4cdca58123d12b242201f65e5e to your computer and use it in GitHub Desktop.
Save berkorbay/d5fe5e4cdca58123d12b242201f65e5e to your computer and use it in GitHub Desktop.
QNB Finansbank Rest API Methods
# Source: https://developer.qnbfinansbank.com
# Currently in beta phase so we DO NOT use id and secret instead we use a "code" from one of the accounts.
# Go to: https://developer.qnbfinansbank.com/discovery/GettingStarted/UseTestPlatform
## Follow steps until step 5. The code you get is your token
url = "https://sandbox-api.qnbfinansbank.com/v0/accounts"
my_token = "MY_VERY_LONG_TOKEN"
resval <- httr::GET(url, httr::add_headers(Authorization = paste("Bearer", the_token, sep = " ")))
jsonlite::fromJSON(httr::content(resval,"text"))
# Get info from one of the accountIds. I am writing one. Since it is a test account it is not a secret.
chosen_account_id <- "72651664209515381348491"
resval_acc <- httr::GET(paste0(url,"/",chosen_account_id), httr::add_headers(Authorization = paste("Bearer", the_token, sep = " ")))
jsonlite::fromJSON(httr::content(resval_acc,"text"))
# Get transactions of one of the accountIds. I am writing one. Since it is a test account it is not a secret.
chosen_account_id <- "72651664209515381348491"
resval_acc_txn <- httr::GET(paste0(url,"/",chosen_account_id,"/transactions"), httr::add_headers(Authorization = paste("Bearer", the_token, sep = " ")))
jsonlite::fromJSON(httr::content(resval_acc_txn,"text"))
@ari-ufuk
Copy link

Merhabalar,

bu api ile qnb bankasındaki hesap hareketlerini mi okuyorsunuz ? tam anlayamadım.

@berkorbay
Copy link
Author

@ari-ufuk Finansbank ilk APIlerini denerken oluşturulan bir koddu. Şimdi geçerliliğinin kaldığını zannetmem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment