{"resource_docs":[{"operation_id":"OBPv4.0.0-revokeGrantUserAccessToViews","implemented_by":{"version":"OBPv4.0.0","function":"revokeGrantUserAccessToViews"},"request_verb":"PUT","request_url":"/obp/v4.0.0/banks/BANK_ID/accounts/ACCOUNT_ID/account-access","summary":"Revoke/Grant User access to View","description":"
Revoke/Grant the logged in User access to the views identified by json.
\nAuthentication is Mandatory and the user needs to be an account holder or has owner view access.
\nURL Parameters:
\nACCOUNT_ID: 8ca8a7e4-6d02-40e3-a129-0b2bf89de9f0
\nBANK_ID: gh.29.uk
\nJSON response body fields:
\n\n","description_markdown":"Revoke/Grant the logged in User access to the views identified by json.\n\nAuthentication is Mandatory and the user needs to be an account holder or has owner view access.\n\n\n**URL Parameters:**\n\n[ACCOUNT_ID](/glossary#Account.account_id): 8ca8a7e4-6d02-40e3-a129-0b2bf89de9f0\n\n\n\n[BANK_ID](/glossary#Bank.bank_id): gh.29.uk\n\n\n\n\n\n**JSON response body fields:**\n\n\n\n[**revoked**](/glossary#revoked): \n\n\n","example_request_body":{"views":["ReadAccountsBasic"]},"success_response_body":{"revoked":true},"error_response_bodies":["OBP-20001: User not logged in. Authentication is required!","OBP-20047: The current user does not have access to a view which lists the target account in cangrantaccesstoviews_ permissions","OBP-10001: Incorrect json format.","OBP-20005: User not found. Please specify a valid value for USER_ID.","OBP-30252: System view not found. Please specify a valid value for VIEW_ID","OBP-30005: View not found for Account. Please specify a valid value for VIEW_ID","OBP-30064: Cannot revoke account access.","OBP-30065: Cannot find account access.","OBP-50000: Unknown Error."],"tags":["Account-Access","View-Custom","Account","User","OwnerViewRequired"],"typed_request_body":{"type":"object","properties":{"views":{"type":"array","items":{"type":"string"}}}},"typed_success_response_body":{"type":"object","properties":{"revoked":{"type":"boolean"}}},"is_featured":false,"special_instructions":"","specified_url":"/obp/v4.0.0/banks/BANK_ID/accounts/ACCOUNT_ID/account-access","connector_methods":[]},{"operation_id":"OBPv4.0.0-grantUserAccessToView","implemented_by":{"version":"OBPv4.0.0","function":"grantUserAccessToView"},"request_verb":"POST","request_url":"/obp/v4.0.0/banks/BANK_ID/accounts/ACCOUNT_ID/account-access/grant","summary":"Grant User access to View","description":"Grants the User identified by USER_ID access to the view identified by VIEW_ID.
\nAuthentication is Mandatory and the user needs to be account holder.
\nURL Parameters:
\nACCOUNT_ID: 8ca8a7e4-6d02-40e3-a129-0b2bf89de9f0
\nBANK_ID: gh.29.uk
\nJSON request body fields:
\nis_system: true
\nuser_id: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1
\nview:
\nview_id: owner
\nJSON response body fields:
\n\n\n\ncan_add_counterparty: true
\n\ncan_add_image_url: true
\ncan_add_more_info: true
\n\n\n\n\ncan_add_tag: true
\ncan_add_transaction_request_to_any_account:
\ncan_add_transaction_request_to_own_account:
\n\n\ncan_create_direct_debit: true
\n\n\ncan_delete_corporate_location: true
\ncan_delete_image: true
\n\n\ncan_delete_where_tag: true
\ncan_edit_owner_comment: true
\ncan_query_available_funds: true
\n\ncan_see_bank_account_bank_name: true
\ncan_see_bank_account_credit_limit: true
\ncan_see_bank_account_currency:
\n\ncan_see_bank_account_label: true
\ncan_see_bank_account_national_identifier:
\ncan_see_bank_account_number: true
\ncan_see_bank_account_owners: true
\ncan_see_bank_account_routing_address:
\ncan_see_bank_account_routing_scheme:
\ncan_see_bank_account_swift_bic:
\n\ncan_see_bank_routing_address: true
\n\n\ncan_see_corporate_location: true
\ncan_see_image_url: true
\ncan_see_images: true
\n\n\ncan_see_other_account_bank_name:
\n\n\ncan_see_other_account_metadata:
\ncan_see_other_account_national_identifier: true
\ncan_see_other_account_number: true
\ncan_see_other_account_routing_address: true
\ncan_see_other_account_routing_scheme:
\ncan_see_other_account_swift_bic: true
\ncan_see_other_bank_routing_address:
\ncan_see_other_bank_routing_scheme:
\n\n\n\n\n\ncan_see_transaction_amount: true
\n\n\ncan_see_transaction_description: true
\ncan_see_transaction_finish_date:
\n\ncan_see_transaction_other_bank_account:
\ncan_see_transaction_start_date:
\ncan_see_transaction_this_bank_account:
\n\ncan_see_url: true
\ncan_see_where_tag: true
\ndescription: This an optional field. Maximum length is 2000. It can be any characters here.
\n\nid: d8839721-ad8f-45dd-9f78-2080414b93f9
\nis_public: true
\nis_system: true
\n\n\n\n","description_markdown":"Grants the User identified by USER_ID access to the view identified by VIEW_ID.\n\nAuthentication is Mandatory and the user needs to be account holder.\n\n\n**URL Parameters:**\n\n[ACCOUNT_ID](/glossary#Account.account_id): 8ca8a7e4-6d02-40e3-a129-0b2bf89de9f0\n\n\n\n[BANK_ID](/glossary#Bank.bank_id): gh.29.uk\n\n\n\n\n\n**JSON request body fields:**\n\n\n\n[**is_system**](/glossary#): true\n\n\n\n[**user_id**](/glossary#): 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1\n\n\n\n[**view**](/glossary#view): \n\n\n\n[**view_id**](/glossary#): owner\n\n\n\n\n\n**JSON response body fields:**\n\n\n\n[**alias**](/glossary#alias): \n\n\n\n[**can_add_comment**](/glossary#can_add_comment): \n\n\n\n[**can_add_corporate_location**](/glossary#can_add_corporate_location): \n\n\n\n[**can_add_counterparty**](/glossary#can_add_counterparty): true\n\n\n\n[**can_add_image**](/glossary#can_add_image): \n\n\n\n[**can_add_image_url**](/glossary#can_add_image_url): true\n\n\n\n[**can_add_more_info**](/glossary#can_add_more_info): true\n\n\n\n[**can_add_open_corporates_url**](/glossary#can_add_open_corporates_url): \n\n\n\n[**can_add_physical_location**](/glossary#can_add_physical_location): \n\n\n\n[**can_add_private_alias**](/glossary#can_add_private_alias): \n\n\n\n[**can_add_public_alias**](/glossary#can_add_public_alias): \n\n\n\n[**can_add_tag**](/glossary#can_add_tag): true\n\n\n\n[**can_add_transaction_request_to_any_account**](/glossary#can_add_transaction_request_to_any_account): \n\n\n\n[**can_add_transaction_request_to_own_account**](/glossary#can_add_transaction_request_to_own_account): \n\n\n\n[**can_add_url**](/glossary#can_add_url): \n\n\n\n[**can_add_where_tag**](/glossary#can_add_where_tag): \n\n\n\n[**can_create_direct_debit**](/glossary#can_create_direct_debit): true\n\n\n\n[**can_create_standing_order**](/glossary#can_create_standing_order): \n\n\n\n[**can_delete_comment**](/glossary#can_delete_comment): \n\n\n\n[**can_delete_corporate_location**](/glossary#can_delete_corporate_location): true\n\n\n\n[**can_delete_image**](/glossary#can_delete_image): true\n\n\n\n[**can_delete_physical_location**](/glossary#can_delete_physical_location): \n\n\n\n[**can_delete_tag**](/glossary#can_delete_tag): \n\n\n\n[**can_delete_where_tag**](/glossary#can_delete_where_tag): true\n\n\n\n[**can_edit_owner_comment**](/glossary#can_edit_owner_comment): true\n\n\n\n[**can_query_available_funds**](/glossary#can_query_available_funds): true\n\n\n\n[**can_see_bank_account_balance**](/glossary#can_see_bank_account_balance): \n\n\n\n[**can_see_bank_account_bank_name**](/glossary#can_see_bank_account_bank_name): true\n\n\n\n[**can_see_bank_account_credit_limit**](/glossary#can_see_bank_account_credit_limit): true\n\n\n\n[**can_see_bank_account_currency**](/glossary#can_see_bank_account_currency): \n\n\n\n[**can_see_bank_account_iban**](/glossary#can_see_bank_account_iban): \n\n\n\n[**can_see_bank_account_label**](/glossary#can_see_bank_account_label): true\n\n\n\n[**can_see_bank_account_national_identifier**](/glossary#can_see_bank_account_national_identifier): \n\n\n\n[**can_see_bank_account_number**](/glossary#can_see_bank_account_number): true\n\n\n\n[**can_see_bank_account_owners**](/glossary#can_see_bank_account_owners): true\n\n\n\n[**can_see_bank_account_routing_address**](/glossary#can_see_bank_account_routing_address): \n\n\n\n[**can_see_bank_account_routing_scheme**](/glossary#can_see_bank_account_routing_scheme): \n\n\n\n[**can_see_bank_account_swift_bic**](/glossary#can_see_bank_account_swift_bic): \n\n\n\n[**can_see_bank_account_type**](/glossary#can_see_bank_account_type): \n\n\n\n[**can_see_bank_routing_address**](/glossary#can_see_bank_routing_address): true\n\n\n\n[**can_see_bank_routing_scheme**](/glossary#can_see_bank_routing_scheme): \n\n\n\n[**can_see_comments**](/glossary#can_see_comments): \n\n\n\n[**can_see_corporate_location**](/glossary#can_see_corporate_location): true\n\n\n\n[**can_see_image_url**](/glossary#can_see_image_url): true\n\n\n\n[**can_see_images**](/glossary#can_see_images): true\n\n\n\n[**can_see_more_info**](/glossary#can_see_more_info): \n\n\n\n[**can_see_open_corporates_url**](/glossary#can_see_open_corporates_url): \n\n\n\n[**can_see_other_account_bank_name**](/glossary#can_see_other_account_bank_name): \n\n\n\n[**can_see_other_account_iban**](/glossary#can_see_other_account_iban): \n\n\n\n[**can_see_other_account_kind**](/glossary#can_see_other_account_kind): \n\n\n\n[**can_see_other_account_metadata**](/glossary#can_see_other_account_metadata): \n\n\n\n[**can_see_other_account_national_identifier**](/glossary#can_see_other_account_national_identifier): true\n\n\n\n[**can_see_other_account_number**](/glossary#can_see_other_account_number): true\n\n\n\n[**can_see_other_account_routing_address**](/glossary#can_see_other_account_routing_address): true\n\n\n\n[**can_see_other_account_routing_scheme**](/glossary#can_see_other_account_routing_scheme): \n\n\n\n[**can_see_other_account_swift_bic**](/glossary#can_see_other_account_swift_bic): true\n\n\n\n[**can_see_other_bank_routing_address**](/glossary#can_see_other_bank_routing_address): \n\n\n\n[**can_see_other_bank_routing_scheme**](/glossary#can_see_other_bank_routing_scheme): \n\n\n\n[**can_see_owner_comment**](/glossary#can_see_owner_comment): \n\n\n\n[**can_see_physical_location**](/glossary#can_see_physical_location): \n\n\n\n[**can_see_private_alias**](/glossary#can_see_private_alias): \n\n\n\n[**can_see_public_alias**](/glossary#can_see_public_alias): \n\n\n\n[**can_see_tags**](/glossary#can_see_tags): \n\n\n\n[**can_see_transaction_amount**](/glossary#can_see_transaction_amount): true\n\n\n\n[**can_see_transaction_balance**](/glossary#can_see_transaction_balance): \n\n\n\n[**can_see_transaction_currency**](/glossary#can_see_transaction_currency): \n\n\n\n[**can_see_transaction_description**](/glossary#can_see_transaction_description): true\n\n\n\n[**can_see_transaction_finish_date**](/glossary#can_see_transaction_finish_date): \n\n\n\n[**can_see_transaction_metadata**](/glossary#can_see_transaction_metadata): \n\n\n\n[**can_see_transaction_other_bank_account**](/glossary#can_see_transaction_other_bank_account): \n\n\n\n[**can_see_transaction_start_date**](/glossary#can_see_transaction_start_date): \n\n\n\n[**can_see_transaction_this_bank_account**](/glossary#can_see_transaction_this_bank_account): \n\n\n\n[**can_see_transaction_type**](/glossary#can_see_transaction_type): \n\n\n\n[**can_see_url**](/glossary#can_see_url): true\n\n\n\n[**can_see_where_tag**](/glossary#can_see_where_tag): true\n\n\n\n[**description**](/glossary#description): This an optional field. Maximum length is 2000. It can be any characters here.\n\n\n\n[**hide_metadata_if_alias_used**](/glossary#hide_metadata_if_alias_used): \n\n\n\n[**id**](/glossary#id): d8839721-ad8f-45dd-9f78-2080414b93f9\n\n\n\n[**is_public**](/glossary#is_public): true\n\n\n\n[**is_system**](/glossary#): true\n\n\n\n[**metadata_view**](/glossary#metadata_view): \n\n\n\n[**short_name**](/glossary#short_name): \n\n\n\n[is_firehose](/glossary#is_firehose): \n\n\n","example_request_body":{"user_id":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1","view":{"view_id":"owner","is_system":true}},"success_response_body":{"id":"1234","short_name":"short_name","description":"description","metadata_view":"owner","is_public":true,"is_system":true,"alias":"No","hide_metadata_if_alias_used":true,"can_add_comment":true,"can_add_corporate_location":true,"can_add_image":true,"can_add_image_url":true,"can_add_more_info":true,"can_add_open_corporates_url":true,"can_add_physical_location":true,"can_add_private_alias":true,"can_add_public_alias":true,"can_add_tag":true,"can_add_url":true,"can_add_where_tag":true,"can_delete_comment":true,"can_add_counterparty":true,"can_delete_corporate_location":true,"can_delete_image":true,"can_delete_physical_location":true,"can_delete_tag":true,"can_delete_where_tag":true,"can_edit_owner_comment":true,"can_see_bank_account_balance":true,"can_query_available_funds":true,"can_see_bank_account_bank_name":true,"can_see_bank_account_currency":true,"can_see_bank_account_iban":true,"can_see_bank_account_label":true,"can_see_bank_account_national_identifier":true,"can_see_bank_account_number":true,"can_see_bank_account_owners":true,"can_see_bank_account_swift_bic":true,"can_see_bank_account_type":true,"can_see_comments":true,"can_see_corporate_location":true,"can_see_image_url":true,"can_see_images":true,"can_see_more_info":true,"can_see_open_corporates_url":true,"can_see_other_account_bank_name":true,"can_see_other_account_iban":true,"can_see_other_account_kind":true,"can_see_other_account_metadata":true,"can_see_other_account_national_identifier":true,"can_see_other_account_number":true,"can_see_other_account_swift_bic":true,"can_see_owner_comment":true,"can_see_physical_location":true,"can_see_private_alias":true,"can_see_public_alias":true,"can_see_tags":true,"can_see_transaction_amount":true,"can_see_transaction_balance":true,"can_see_transaction_currency":true,"can_see_transaction_description":true,"can_see_transaction_finish_date":true,"can_see_transaction_metadata":true,"can_see_transaction_other_bank_account":true,"can_see_transaction_start_date":true,"can_see_transaction_this_bank_account":true,"can_see_transaction_type":true,"can_see_url":true,"can_see_where_tag":true,"can_see_bank_routing_scheme":true,"can_see_bank_routing_address":true,"can_see_bank_account_routing_scheme":true,"can_see_bank_account_routing_address":true,"can_see_other_bank_routing_scheme":true,"can_see_other_bank_routing_address":true,"can_see_other_account_routing_scheme":true,"can_see_other_account_routing_address":true,"can_add_transaction_request_to_own_account":true,"can_add_transaction_request_to_any_account":true,"can_see_bank_account_credit_limit":true,"can_create_direct_debit":true,"can_create_standing_order":true},"error_response_bodies":["OBP-20001: User not logged in. Authentication is required!","OBP-20047: The current user does not have access to a view which lists the target account in cangrantaccesstoviews_ permissions","OBP-10001: Incorrect json format.","OBP-20005: User not found. Please specify a valid value for USER_ID.","OBP-30252: System view not found. Please specify a valid value for VIEW_ID","OBP-30005: View not found for Account. Please specify a valid value for VIEW_ID","OBP-30063: Cannot grant account access.","OBP-50000: Unknown Error."],"tags":["Account-Access","View-Custom","Account","User","OwnerViewRequired"],"typed_request_body":{"type":"object","properties":{"view":{"type":"object","properties":{"is_system":{"type":"boolean"},"view_id":{"type":"string"}}},"user_id":{"type":"string"}}},"typed_success_response_body":{"type":"object","properties":{"can_see_other_account_swift_bic":{"type":"boolean"},"can_see_where_tag":{"type":"boolean"},"can_see_url":{"type":"boolean"},"can_create_direct_debit":{"type":"boolean"},"can_see_bank_account_swift_bic":{"type":"boolean"},"can_see_bank_account_routing_address":{"type":"boolean"},"can_see_tags":{"type":"boolean"},"can_see_transaction_balance":{"type":"boolean"},"can_delete_corporate_location":{"type":"boolean"},"can_add_image_url":{"type":"boolean"},"can_see_public_alias":{"type":"boolean"},"can_add_transaction_request_to_own_account":{"type":"boolean"},"can_add_comment":{"type":"boolean"},"can_see_other_bank_routing_scheme":{"type":"boolean"},"description":{"type":"string"},"can_see_corporate_location":{"type":"boolean"},"can_see_other_account_bank_name":{"type":"boolean"},"can_see_more_info":{"type":"boolean"},"can_add_counterparty":{"type":"boolean"},"is_system":{"type":"boolean"},"can_see_physical_location":{"type":"boolean"},"can_query_available_funds":{"type":"boolean"},"can_edit_owner_comment":{"type":"boolean"},"can_see_private_alias":{"type":"boolean"},"can_see_bank_account_credit_limit":{"type":"boolean"},"can_see_other_account_routing_address":{"type":"boolean"},"can_see_bank_account_balance":{"type":"boolean"},"can_add_public_alias":{"type":"boolean"},"can_see_bank_routing_scheme":{"type":"boolean"},"can_see_bank_account_owners":{"type":"boolean"},"can_see_other_account_metadata":{"type":"boolean"},"can_delete_physical_location":{"type":"boolean"},"hide_metadata_if_alias_used":{"type":"boolean"},"can_see_transaction_this_bank_account":{"type":"boolean"},"can_see_image_url":{"type":"boolean"},"can_see_transaction_type":{"type":"boolean"},"can_see_images":{"type":"boolean"},"can_see_transaction_amount":{"type":"boolean"},"metadata_view":{"type":"string"},"can_see_transaction_metadata":{"type":"boolean"},"can_see_comments":{"type":"boolean"},"can_see_other_account_iban":{"type":"boolean"},"can_add_image":{"type":"boolean"},"can_see_bank_account_routing_scheme":{"type":"boolean"},"can_see_bank_account_type":{"type":"boolean"},"can_see_other_account_kind":{"type":"boolean"},"can_see_bank_account_currency":{"type":"boolean"},"can_add_where_tag":{"type":"boolean"},"can_see_transaction_start_date":{"type":"boolean"},"can_see_bank_account_label":{"type":"boolean"},"can_add_private_alias":{"type":"boolean"},"can_see_transaction_currency":{"type":"boolean"},"can_add_more_info":{"type":"boolean"},"can_delete_comment":{"type":"boolean"},"can_create_standing_order":{"type":"boolean"},"can_see_other_bank_routing_address":{"type":"boolean"},"can_see_transaction_other_bank_account":{"type":"boolean"},"can_see_bank_account_number":{"type":"boolean"},"can_add_corporate_location":{"type":"boolean"},"alias":{"type":"string"},"can_add_url":{"type":"boolean"},"short_name":{"type":"string"},"can_delete_where_tag":{"type":"boolean"},"is_public":{"type":"boolean"},"can_see_owner_comment":{"type":"boolean"},"can_see_transaction_finish_date":{"type":"boolean"},"can_see_open_corporates_url":{"type":"boolean"},"can_add_physical_location":{"type":"boolean"},"can_see_bank_account_iban":{"type":"boolean"},"can_see_other_account_national_identifier":{"type":"boolean"},"can_see_bank_routing_address":{"type":"boolean"},"can_delete_image":{"type":"boolean"},"can_add_transaction_request_to_any_account":{"type":"boolean"},"can_add_tag":{"type":"boolean"},"id":{"type":"string"},"can_see_other_account_routing_scheme":{"type":"boolean"},"can_add_open_corporates_url":{"type":"boolean"},"can_delete_tag":{"type":"boolean"},"can_see_transaction_description":{"type":"boolean"},"can_see_bank_account_national_identifier":{"type":"boolean"},"can_see_other_account_number":{"type":"boolean"},"can_see_bank_account_bank_name":{"type":"boolean"}}},"is_featured":false,"special_instructions":"","specified_url":"/obp/v4.0.0/banks/BANK_ID/accounts/ACCOUNT_ID/account-access/grant","connector_methods":[]},{"operation_id":"OBPv4.0.0-revokeUserAccessToView","implemented_by":{"version":"OBPv4.0.0","function":"revokeUserAccessToView"},"request_verb":"POST","request_url":"/obp/v4.0.0/banks/BANK_ID/accounts/ACCOUNT_ID/account-access/revoke","summary":"Revoke User access to View","description":"Revoke the User identified by USER_ID access to the view identified by VIEW_ID.
\nAuthentication is Mandatory and the user needs to be account holder.
\nURL Parameters:
\nACCOUNT_ID: 8ca8a7e4-6d02-40e3-a129-0b2bf89de9f0
\nBANK_ID: gh.29.uk
\nJSON request body fields:
\nis_system: true
\nuser_id: 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1
\nview:
\nview_id: owner
\nJSON response body fields:
\n\n","description_markdown":"Revoke the User identified by USER_ID access to the view identified by VIEW_ID.\n\nAuthentication is Mandatory and the user needs to be account holder.\n\n\n**URL Parameters:**\n\n[ACCOUNT_ID](/glossary#Account.account_id): 8ca8a7e4-6d02-40e3-a129-0b2bf89de9f0\n\n\n\n[BANK_ID](/glossary#Bank.bank_id): gh.29.uk\n\n\n\n\n\n**JSON request body fields:**\n\n\n\n[**is_system**](/glossary#): true\n\n\n\n[**user_id**](/glossary#): 9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1\n\n\n\n[**view**](/glossary#view): \n\n\n\n[**view_id**](/glossary#): owner\n\n\n\n\n\n**JSON response body fields:**\n\n\n\n[**revoked**](/glossary#revoked): \n\n\n","example_request_body":{"user_id":"9ca9a7e4-6d02-40e3-a129-0b2bf89de9b1","view":{"view_id":"owner","is_system":true}},"success_response_body":{"revoked":true},"error_response_bodies":["OBP-20001: User not logged in. Authentication is required!","OBP-20047: The current user does not have access to a view which lists the target account in cangrantaccesstoviews_ permissions","OBP-10001: Incorrect json format.","OBP-20005: User not found. Please specify a valid value for USER_ID.","OBP-30252: System view not found. Please specify a valid value for VIEW_ID","OBP-30005: View not found for Account. Please specify a valid value for VIEW_ID","OBP-30064: Cannot revoke account access.","OBP-30065: Cannot find account access.","OBP-50000: Unknown Error."],"tags":["Account-Access","View-Custom","Account","User","OwnerViewRequired"],"typed_request_body":{"type":"object","properties":{"view":{"type":"object","properties":{"is_system":{"type":"boolean"},"view_id":{"type":"string"}}},"user_id":{"type":"string"}}},"typed_success_response_body":{"type":"object","properties":{"revoked":{"type":"boolean"}}},"is_featured":false,"special_instructions":"","specified_url":"/obp/v4.0.0/banks/BANK_ID/accounts/ACCOUNT_ID/account-access/revoke","connector_methods":[]},{"operation_id":"OBPv4.0.0-createUserWithAccountAccess","implemented_by":{"version":"OBPv4.0.0","function":"createUserWithAccountAccess"},"request_verb":"POST","request_url":"/obp/v4.0.0/banks/BANK_ID/accounts/ACCOUNT_ID/user-account-access","summary":"Create (DAuth) User with Account Access","description":"This endpoint is used as part of the DAuth solution to grant access to account and transaction data to a smart contract on the blockchain.
\nPut the smart contract address in username
\nFor provider use "dauth"
\nThis endpoint will create the (DAuth) User with username and provider if the User does not already exist.
\nAuthentication is Mandatory and the logged in user needs to be account holder.
\nFor information about DAuth see below:
\nDAuth is an experimental authentication mechanism that aims to pin an ethereum or other blockchain Smart Contract to an OBP "User".
\nIn the future, it might be possible to be more specific and pin specific actors (wallets) that are acting within the smart contract, but so far, one smart contract acts on behalf of one User.
\nThus, if a smart contract "X" calls the OBP API using the DAuth header, OBP will get or create a user called X and the call will proceed in the context of that User "X".
\nDAuth is invoked by the REST client (caller) including a specific header (see step 3 below) in any OBP REST call.
\nWhen OBP receives the DAuth token, it creates or gets a User with a username based on the smart_contract_address and the provider based on the network_name. The combination of username and provider is unique in OBP.
\nIf you are calling OBP-API via an API3 Airnode, the Airnode will take care of constructing the required header.
\nWhen OBP detects a DAuth header / token it first checks if the Consumer is allowed to make such a call. OBP will validate the Consumer ip address and signature etc.
\nNote: The DAuth flow does not require an explicit POST like Direct Login to create the token.
\nPermissions may be assigned to an OBP User at any time, via the UserAuthContext, Views, Entitlements to Roles or Consents.
\nNote: DAuth is NOT enabled on this instance!
\nNote: The DAuth client is responsible for creating a token which will be trusted by OBP absolutely!
\nTo use DAuth:
\nSet up properties in your props file
\n# -- DAuth --------------------------------------\n# Define secret used to validate JWT token\n# jwt.public_key_rsa=path-to-the-pem-file\n# Enable/Disable DAuth communication at all\n# In case isn't defined default value is false\n# allow_dauth=false\n# Define comma separated list of allowed IP addresses\n# dauth.host=127.0.0.1\n# -------------------------------------- DAuth--\n
\nPlease keep in mind that property jwt.public_key_rsa is used to validate JWT token to check it is not changed or corrupted during transport.
\nThe following videos are available:
\n* DAuth in local environment
HEADER:ALGORITHM & TOKEN TYPE
\n{\n "alg": "RS256",\n "typ": "JWT"\n}\n
\nPAYLOAD:DATA
\n{\n "smart_contract_address": "0xe123425E7734CE288F8367e1Bb143E90bb3F051224",\n "network_name": "AIRNODE.TESTNET.ETHEREUM",\n "msg_sender": "0xe12340927f1725E7734CE288F8367e1Bb143E90fhku767",\n "consumer_key": "0x1234a4ec31e89cea54d1f125db7536e874ab4a96b4d4f6438668b6bb10a6adb",\n "timestamp": "2021-11-04T14:13:40Z",\n "request_id": "0Xe876987694328763492876348928736497869273649"\n}\n
\nVERIFY SIGNATURE
\nRSASHA256(\n base64UrlEncode(header) + "." +\n base64UrlEncode(payload),\n) your-RSA-key-pair
\n
\nHere is an example token:
\neyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFydF9jb250cmFjdF9hZGRyZXNzIjoiMHhlMTIzNDI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGJiM0YwNTEyMjQiLCJuZXR3b3JrX25hbWUiOiJFVEhFUkVVTSIsIm1zZ19zZW5kZXIiOiIweGUxMjM0MDkyN2YxNzI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGZoa3U3NjciLCJjb25zdW1lcl9rZXkiOiIweDEyMzRhNGVjMzFlODljZWE1NGQxZjEyNWRiNzUzNmU4NzRhYjRhOTZiNGQ0ZjY0Mzg2NjhiNmJiMTBhNmFkYiIsInRpbWVzdGFtcCI6IjIwMjEtMTEtMDRUMTQ6MTM6NDBaIiwicmVxdWVzdF9pZCI6IjBYZTg3Njk4NzY5NDMyODc2MzQ5Mjg3NjM0ODkyODczNjQ5Nzg2OTI3MzY0OSJ9.XSiQxjEVyCouf7zT8MubEKsbOBZuReGVhnt9uck6z6k\n
\nUsing your favorite http client:
\nGET https://apisandbox.openbankproject.com/obp/v3.0.0/users/current
\nBody
\nLeave Empty!
\nHeaders:
\n DAuth: your-jwt-from-step-above\n
\nHere is it all together:
\nGET https://apisandbox.openbankproject.com/obp/v3.0.0/users/current HTTP/1.1
\nHost: localhost:8080
\nUser-Agent: curl/7.47.0
\nAccept: /
\nDAuth: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFydF9jb250cmFjdF9hZGRyZXNzIjoiMHhlMTIzNDI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGJiM0YwNTEyMjQiLCJuZXR3b3JrX25hbWUiOiJFVEhFUkVVTSIsIm1zZ19zZW5kZXIiOiIweGUxMjM0MDkyN2YxNzI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGZoa3U3NjciLCJjb25zdW1lcl9rZXkiOiIweDEyMzRhNGVjMzFlODljZWE1NGQxZjEyNWRiNzUzNmU4NzRhYjRhOTZiNGQ0ZjY0Mzg2NjhiNmJiMTBhNmFkYiIsInRpbWVzdGFtcCI6IjIwMjEtMTEtMDRUMTQ6MTM6NDBaIiwicmVxdWVzdF9pZCI6IjBYZTg3Njk4NzY5NDMyODc2MzQ5Mjg3NjM0ODkyODczNjQ5Nzg2OTI3MzY0OSJ9.XSiQxjEVyCouf7zT8MubEKsbOBZuReGVhnt9uck6z6k
CURL example
\ncurl -v -H 'DAuth: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFydF9jb250cmFjdF9hZGRyZXNzIjoiMHhlMTIzNDI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGJiM0YwNTEyMjQiLCJuZXR3b3JrX25hbWUiOiJFVEhFUkVVTSIsIm1zZ19zZW5kZXIiOiIweGUxMjM0MDkyN2YxNzI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGZoa3U3NjciLCJjb25zdW1lcl9rZXkiOiIweDEyMzRhNGVjMzFlODljZWE1NGQxZjEyNWRiNzUzNmU4NzRhYjRhOTZiNGQ0ZjY0Mzg2NjhiNmJiMTBhNmFkYiIsInRpbWVzdGFtcCI6IjIwMjEtMTEtMDRUMTQ6MTM6NDBaIiwicmVxdWVzdF9pZCI6IjBYZTg3Njk4NzY5NDMyODc2MzQ5Mjg3NjM0ODkyODczNjQ5Nzg2OTI3MzY0OSJ9.XSiQxjEVyCouf7zT8MubEKsbOBZuReGVhnt9uck6z6k' https://apisandbox.openbankproject.com/obp/v3.0.0/users/current\n
\nYou should receive a response like:
\n{\n "user_id": "4c4d3175-1e5c-4cfd-9b08-dcdc209d8221",\n "email": "",\n "provider_id": "0xe123425E7734CE288F8367e1Bb143E90bb3F051224",\n "provider": "ETHEREUM",\n "username": "0xe123425E7734CE288F8367e1Bb143E90bb3F051224",\n "entitlements": {\n "list": []\n }\n}\n
\nThe file, dauth.scala handles the DAuth,
\nWe:
\n-> Check if Props allow_dauth is true\n -> Check if DAuth header exists\n -> Check if getRemoteIpAddress is OK\n -> Look for "token"\n -> parse the JWT token and getOrCreate the user\n -> get the data of the user\n
\nParameter names and values are case sensitive.
\nEach parameter MUST NOT appear more than once per request.
URL Parameters:
\nACCOUNT_ID: 8ca8a7e4-6d02-40e3-a129-0b2bf89de9f0
\nBANK_ID: gh.29.uk
\nJSON request body fields:
\nis_system: true
\nprovider: ETHEREUM
\nusername: felixsmith
\nview_id: owner
\n\nJSON response body fields:
\n\n\n\ncan_add_counterparty: true
\n\ncan_add_image_url: true
\ncan_add_more_info: true
\n\n\n\n\ncan_add_tag: true
\ncan_add_transaction_request_to_any_account:
\ncan_add_transaction_request_to_own_account:
\n\n\ncan_create_direct_debit: true
\n\n\ncan_delete_corporate_location: true
\ncan_delete_image: true
\n\n\ncan_delete_where_tag: true
\ncan_edit_owner_comment: true
\ncan_query_available_funds: true
\n\ncan_see_bank_account_bank_name: true
\ncan_see_bank_account_credit_limit: true
\ncan_see_bank_account_currency:
\n\ncan_see_bank_account_label: true
\ncan_see_bank_account_national_identifier:
\ncan_see_bank_account_number: true
\ncan_see_bank_account_owners: true
\ncan_see_bank_account_routing_address:
\ncan_see_bank_account_routing_scheme:
\ncan_see_bank_account_swift_bic:
\n\ncan_see_bank_routing_address: true
\n\n\ncan_see_corporate_location: true
\ncan_see_image_url: true
\ncan_see_images: true
\n\n\ncan_see_other_account_bank_name:
\n\n\ncan_see_other_account_metadata:
\ncan_see_other_account_national_identifier: true
\ncan_see_other_account_number: true
\ncan_see_other_account_routing_address: true
\ncan_see_other_account_routing_scheme:
\ncan_see_other_account_swift_bic: true
\ncan_see_other_bank_routing_address:
\ncan_see_other_bank_routing_scheme:
\n\n\n\n\n\ncan_see_transaction_amount: true
\n\n\ncan_see_transaction_description: true
\ncan_see_transaction_finish_date:
\n\ncan_see_transaction_other_bank_account:
\ncan_see_transaction_start_date:
\ncan_see_transaction_this_bank_account:
\n\ncan_see_url: true
\ncan_see_where_tag: true
\ndescription: This an optional field. Maximum length is 2000. It can be any characters here.
\n\nid: d8839721-ad8f-45dd-9f78-2080414b93f9
\nis_public: true
\nis_system: true
\n\n\n\n","description_markdown":"This endpoint is used as part of the DAuth solution to grant access to account and transaction data to a smart contract on the blockchain.\n\nPut the smart contract address in username\n\nFor provider use \"dauth\"\n\nThis endpoint will create the (DAuth) User with username and provider if the User does not already exist.\n\nAuthentication is Mandatory and the logged in user needs to be account holder.\n\nFor information about DAuth see below:\n\n\nDAuth is an experimental authentication mechanism that aims to pin an ethereum or other blockchain Smart Contract to an OBP "User".
\nIn the future, it might be possible to be more specific and pin specific actors (wallets) that are acting within the smart contract, but so far, one smart contract acts on behalf of one User.
\nThus, if a smart contract "X" calls the OBP API using the DAuth header, OBP will get or create a user called X and the call will proceed in the context of that User "X".
\nDAuth is invoked by the REST client (caller) including a specific header (see step 3 below) in any OBP REST call.
\nWhen OBP receives the DAuth token, it creates or gets a User with a username based on the smart_contract_address and the provider based on the network_name. The combination of username and provider is unique in OBP.
\nIf you are calling OBP-API via an API3 Airnode, the Airnode will take care of constructing the required header.
\nWhen OBP detects a DAuth header / token it first checks if the Consumer is allowed to make such a call. OBP will validate the Consumer ip address and signature etc.
\nNote: The DAuth flow does not require an explicit POST like Direct Login to create the token.
\nPermissions may be assigned to an OBP User at any time, via the UserAuthContext, Views, Entitlements to Roles or Consents.
\nNote: DAuth is NOT enabled on this instance!
\nNote: The DAuth client is responsible for creating a token which will be trusted by OBP absolutely!
\nTo use DAuth:
\nSet up properties in your props file
\n# -- DAuth --------------------------------------\n# Define secret used to validate JWT token\n# jwt.public_key_rsa=path-to-the-pem-file\n# Enable/Disable DAuth communication at all\n# In case isn't defined default value is false\n# allow_dauth=false\n# Define comma separated list of allowed IP addresses\n# dauth.host=127.0.0.1\n# -------------------------------------- DAuth--\n
\nPlease keep in mind that property jwt.public_key_rsa is used to validate JWT token to check it is not changed or corrupted during transport.
\nThe following videos are available:
\n* DAuth in local environment
HEADER:ALGORITHM & TOKEN TYPE
\n{\n "alg": "RS256",\n "typ": "JWT"\n}\n
\nPAYLOAD:DATA
\n{\n "smart_contract_address": "0xe123425E7734CE288F8367e1Bb143E90bb3F051224",\n "network_name": "AIRNODE.TESTNET.ETHEREUM",\n "msg_sender": "0xe12340927f1725E7734CE288F8367e1Bb143E90fhku767",\n "consumer_key": "0x1234a4ec31e89cea54d1f125db7536e874ab4a96b4d4f6438668b6bb10a6adb",\n "timestamp": "2021-11-04T14:13:40Z",\n "request_id": "0Xe876987694328763492876348928736497869273649"\n}\n
\nVERIFY SIGNATURE
\nRSASHA256(\n base64UrlEncode(header) + "." +\n base64UrlEncode(payload),\n\n) your-RSA-key-pair\n
\nHere is an example token:
\neyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFydF9jb250cmFjdF9hZGRyZXNzIjoiMHhlMTIzNDI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGJiM0YwNTEyMjQiLCJuZXR3b3JrX25hbWUiOiJFVEhFUkVVTSIsIm1zZ19zZW5kZXIiOiIweGUxMjM0MDkyN2YxNzI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGZoa3U3NjciLCJjb25zdW1lcl9rZXkiOiIweDEyMzRhNGVjMzFlODljZWE1NGQxZjEyNWRiNzUzNmU4NzRhYjRhOTZiNGQ0ZjY0Mzg2NjhiNmJiMTBhNmFkYiIsInRpbWVzdGFtcCI6IjIwMjEtMTEtMDRUMTQ6MTM6NDBaIiwicmVxdWVzdF9pZCI6IjBYZTg3Njk4NzY5NDMyODc2MzQ5Mjg3NjM0ODkyODczNjQ5Nzg2OTI3MzY0OSJ9.XSiQxjEVyCouf7zT8MubEKsbOBZuReGVhnt9uck6z6k\n
\nUsing your favorite http client:
\nGET https://apisandbox.openbankproject.com/obp/v3.0.0/users/current
\nBody
\nLeave Empty!
\nHeaders:
\n DAuth: your-jwt-from-step-above\n
\nHere is it all together:
\nGET https://apisandbox.openbankproject.com/obp/v3.0.0/users/current HTTP/1.1
\nHost: localhost:8080
\nUser-Agent: curl/7.47.0
\nAccept: /
\nDAuth: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFydF9jb250cmFjdF9hZGRyZXNzIjoiMHhlMTIzNDI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGJiM0YwNTEyMjQiLCJuZXR3b3JrX25hbWUiOiJFVEhFUkVVTSIsIm1zZ19zZW5kZXIiOiIweGUxMjM0MDkyN2YxNzI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGZoa3U3NjciLCJjb25zdW1lcl9rZXkiOiIweDEyMzRhNGVjMzFlODljZWE1NGQxZjEyNWRiNzUzNmU4NzRhYjRhOTZiNGQ0ZjY0Mzg2NjhiNmJiMTBhNmFkYiIsInRpbWVzdGFtcCI6IjIwMjEtMTEtMDRUMTQ6MTM6NDBaIiwicmVxdWVzdF9pZCI6IjBYZTg3Njk4NzY5NDMyODc2MzQ5Mjg3NjM0ODkyODczNjQ5Nzg2OTI3MzY0OSJ9.XSiQxjEVyCouf7zT8MubEKsbOBZuReGVhnt9uck6z6k
CURL example
\ncurl -v -H 'DAuth: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzbWFydF9jb250cmFjdF9hZGRyZXNzIjoiMHhlMTIzNDI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGJiM0YwNTEyMjQiLCJuZXR3b3JrX25hbWUiOiJFVEhFUkVVTSIsIm1zZ19zZW5kZXIiOiIweGUxMjM0MDkyN2YxNzI1RTc3MzRDRTI4OEY4MzY3ZTFCYjE0M0U5MGZoa3U3NjciLCJjb25zdW1lcl9rZXkiOiIweDEyMzRhNGVjMzFlODljZWE1NGQxZjEyNWRiNzUzNmU4NzRhYjRhOTZiNGQ0ZjY0Mzg2NjhiNmJiMTBhNmFkYiIsInRpbWVzdGFtcCI6IjIwMjEtMTEtMDRUMTQ6MTM6NDBaIiwicmVxdWVzdF9pZCI6IjBYZTg3Njk4NzY5NDMyODc2MzQ5Mjg3NjM0ODkyODczNjQ5Nzg2OTI3MzY0OSJ9.XSiQxjEVyCouf7zT8MubEKsbOBZuReGVhnt9uck6z6k' https://apisandbox.openbankproject.com/obp/v3.0.0/users/current\n
\nYou should receive a response like:
\n{\n "user_id": "4c4d3175-1e5c-4cfd-9b08-dcdc209d8221",\n "email": "",\n "provider_id": "0xe123425E7734CE288F8367e1Bb143E90bb3F051224",\n "provider": "ETHEREUM",\n "username": "0xe123425E7734CE288F8367e1Bb143E90bb3F051224",\n "entitlements": {\n "list": []\n }\n}\n
\nThe file, dauth.scala handles the DAuth,
\nWe:
\n-> Check if Props allow_dauth is true\n -> Check if DAuth header exists\n -> Check if getRemoteIpAddress is OK\n -> Look for "token"\n -> parse the JWT token and getOrCreate the user\n -> get the data of the user\n
\nParameter names and values are case sensitive.
\nEach parameter MUST NOT appear more than once per request.