{"id":28568588,"url":"https://github.com/mbanq/mbanq-api-client","last_synced_at":"2026-04-29T13:33:42.510Z","repository":{"id":44083099,"uuid":"202732252","full_name":"Mbanq/mbanq-api-client","owner":"Mbanq","description":"Mbanq API Client for the use during the F10 hackathon","archived":false,"fork":false,"pushed_at":"2023-01-04T07:22:34.000Z","size":627,"stargazers_count":0,"open_issues_count":12,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-10T16:41:12.287Z","etag":null,"topics":["f10","graph","hackathon","js","mbanq","mbanq-api","npm","npm-package","rest"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mbanq.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-16T13:27:18.000Z","updated_at":"2019-09-11T20:56:56.000Z","dependencies_parsed_at":"2023-02-02T03:15:48.974Z","dependency_job_id":null,"html_url":"https://github.com/Mbanq/mbanq-api-client","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Mbanq/mbanq-api-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mbanq%2Fmbanq-api-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mbanq%2Fmbanq-api-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mbanq%2Fmbanq-api-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mbanq%2Fmbanq-api-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mbanq","download_url":"https://codeload.github.com/Mbanq/mbanq-api-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mbanq%2Fmbanq-api-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32427601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T12:24:25.982Z","status":"ssl_error","status_checked_at":"2026-04-29T12:24:24.439Z","response_time":110,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["f10","graph","hackathon","js","mbanq","mbanq-api","npm","npm-package","rest"],"created_at":"2025-06-10T16:30:27.469Z","updated_at":"2026-04-29T13:33:42.482Z","avatar_url":"https://github.com/Mbanq.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mbanq-api-client\nIntended to be used to handle authentication and calls to the Mbanq API in `js` based frontend applications.\n\nThis API client is used in the\n\u003ca href=\"https://github.com/Mbanq/mbanq-hackathon-template\" target=\"_blank\"\u003embanq-hackathon-template\u003c/a\u003e\n\n\n\u003e This package was created for the hackathon and is not intended to be used in\n\u003e production.\n\n# Create an API client\nMbanq API client is very use to use.\n\nFirs you have to add it to your application:\n\n```bash\nnpm i -S Mbanq/mbanq-api-client\n```\n\nBefore you can make calls to the self-service API, you have to initialize a new\nAPI client and authenticate yourself.\n\nTo create the API client you have to do the following:\n\n```js\nconst Mbanq = require('@mbanq/api')\n\nconst Client = new Mbanq({\n  baseURL: 'https://api.cloud.mbanq.com',\n  tenantId: 'your-tenant-identifier',\n  clientId: 'your-client-identifier',\n  clientSecret: 'your-client-secret'\n})\n```\n\n- `baseURL`: default setting points to Mbanq's evaluation evironment\n  `https://api.cloud.mbanq.com`. If you work with the evaluation environment you\ndon't have to do anything\n- `tenantId`: Tenant identifier of your core banking instance that you created\n  in the `console` application e.g. \u003ca href=\"https://console.cloud.mbanq.com\" target=\"_blank\"\u003eMbanq Cloud Console\u003c/a\u003e\n- `clientId`: Client identifier of the App you created for the API use\n- `clientSecret`: Client secret of the App you created for the API use\n\n# Authenticate yourself\nOnce you created an API client, you have to authenticate yourself before you\nstart making calls to the API.\nTo authenticate yourself you have to call `Client.auth()` function with `js`\nobject that contains your `username` and `password` - see example below.\n\n```js\nClient.auth({ username: 'web1', password: 'password' })\n```\n\nAfter the successful `Client.auth()` call, you should have the API tokens in the `localStorage` of your browser and you can start calling the API.\n\n# Calling the API\nThe `mbanq-api-client` offers you an easy way of making calls to Mbanq API. It\noffers a very limited set of functionality and is only intended to be used for\nsmall MVPs.\n\nOnce you created the `Mbanq APi Client` with the use of your `tenantId`,\n`clientId` and `clientSecret` and authenticated yourself by running\n`Client.auth(credentials)` you can start making calls to the api:\n\n```js\nconst api = Client.api()\n\n// if you wanna do it right\n// you should use a `try` and `catch` block\n\nconst yourFunction = async () =\u003e {\n  try {\n    const user = await api.user()\n    const clients = await api.clients()\n    const firstClientsAccounts = await api.accounts(clients.pageItems[0].id)\n  } catch (error) {\n    return error\n  }\n}\n```\n\n## Supported API Calls\nSince the `mbanq-api-client` was created just for the hackathon, it has\na relatively limited functionality.\n\nFollowing API calls are currently supported:\n- `user()` - to get the user details\n- `clients(id)` - to get all `clients` of a `user` or a `client` with\n  a particular `id`\n- `accounts(clientId)` - to get all the `accounts` of a certain `client`\n- `transferTemplates()` - to get the accounts a `transfer` can be created\n  `from` and `to`\n- `createTransfer(transfer)` - to create a 3rd party transfer (to another\n  client of the same bank)\n- `transactions(clientId)` - to get the savings account transactions for\n  a certain client\n\n## Creating a transfer\nBefore you create a transfer you can check which accounts you can send money to, by calling `api.transferTemplates()`.\n\nOnce you know the accounts that are eligible for money transfers you can call `api.createTransfer(transfer)` where transfer object has to have the following data:\n```js\n  const transfer = {\n    fromOfficeId: 1,\n    fromClientId: 11,\n    fromAccountType: 2,\n    fromAccountId: 11,\n    toOfficeId: 1,\n    toClientId: 12,\n    toAccountType: 2,\n    toAccountId: 12,\n    dateFormat: 'dd MMMM yyyy',\n    locale: 'en',\n    transferDate: '4 September 2019',\n    transferAmount: '1.00',\n    transferDescription: 'Subject of the transfer'\n  }\n\n  const sendMoney = async (transfer) =\u003e {\n  try {\n    return await api.createTransfer(transfer)\n  } catch (error) {\n    return error\n  }\n}\n```\n\n# Report a problem\nWhenever you experience a problem with this template or the \u003ca href=\"https://github.com/Mbanq/mbanq-api-client\" target=\"_blank\"\u003embanq-api-client\u003c/a\u003e\n\n\u003ca href=\"https://github.com/Mbanq/mbanq-api-client/issues/new\" target=\"_blank\"\u003eCreate an Issue\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbanq%2Fmbanq-api-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbanq%2Fmbanq-api-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbanq%2Fmbanq-api-client/lists"}