Hi all! I need to create a custom source for getti...
# help-connector-development
l
Hi all! I need to create a custom source for getting the transactions of my client´s bank account. The API is https://nordigen.com/en/docs. From what I´ve read, you get secret key and secret id, then you have to issue access token and refresh token. The API calls to the end point are with bearer access token. Did someone encounterd this kind of authentication? Hoy do you automatically ask for new access token before sending the get request to the end point? AAAHHHH
m
Do you need a new bearer token to each request?
l
When it expires, yes..
m
There is an issue open to handle the extreme case for single use https://github.com/airbytehq/airbyte/issues/3990 You can override the backoff for when your service return an error of expired token request the auth again
l
Hi @Marcos Marx (Airbyte), my recent problem is that the nordigen api uses secret_id and secret_key for refreshing the token and not client id and client secret as the OAuthAuthenticator validation asks. Any workaround I can do? or somewhere I can change the settings that it would ask for the secrets and not client id and client secret? This is the yaml file, which gives me error version: "0.1.0" definitions: selector: extractor: field_pointer: [] requester: url_base: "https://ob.nordigen.com/api/v2" http_method: "GET" authenticator: type: "OAuthAuthenticator" token_refresh_endpoint: "https://ob.nordigen.com/api/v2/token/new/" client_id : "{{ config['secret_id'] }}" client_secret: "{{ config['secret_key'] }}" refresh_token: "" access_token_name: "access" expires_in_name: "access_expires" request_options_provider: request_parameters: account_id: "{{config['account_id']}}" date_from: "{{config['date_from']}}" retriever: record_selector: $ref: "*ref(definitions.selector)" paginator: type: NoPagination requester: $ref: "*ref(definitions.requester)" base_stream: retriever: $ref: "*ref(definitions.retriever)" transactions_stream: $ref: "*ref(definitions.base_stream)" $options: name: "transactions" primary_key: "transactionId" path: "/accounts/{{config['account_id']}}/transactions/" streams: - "*ref(definitions.transactions_stream)" check: stream_names: - "transactions" spec: documentation_url: https://docs.airbyte.com/integrations/sources/nordigen-api connection_specification: title: Nordigen Api Spec type: object OAuth: type: object additionalProperties: true required: - token_refresh_endpoint - client_id - client_secret - refresh_token - access_token_name - expires_in_name - account_id - date_from additionalProperties: true properties: "$options": "$ref": "#/definitions/$options" token_refresh_endpoint: type: string client_id: type: string airbyte_secret: true client_secret: type: string airbyte_secret: true refresh_token: type: string scopes: type: array items: type: string default: [ ] token_expiry_date: type: string access_token_name: type: string default: "access_token" expires_in_name: type: string default: "expires_in" refresh_request_body: type: object grant_type: type: string default: "refresh_token" account_id: type: string date_from: title: Start Date type: string description: Start getting data from that date. pattern: ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ examples: - YYYY-MM-DD It gives me 400 error, bad request as I´m not passing the secret id and secret key in the post request