lib/plaid/api/plaid_api.rb
# Exchange public token for an access token
# Exchange a Link &#x60;public_token&#x60; for an API &#x60;access_token&#x60;. Link hands off the &#x60;public_token&#x60; client-side via the &#x60;onSuccess&#x60; callback once a user has successfully created an Item. The &#x60;public_token&#x60; is ephemeral and expires after 30 minutes.  The response also includes an &#x60;item_id&#x60; that should be stored with the &#x60;access_token&#x60;. The &#x60;item_id&#x60; is used to identify an Item in a webhook. The &#x60;item_id&#x60; can also be retrieved by making an &#x60;/item/get&#x60; request.
# @param item_public_token_exchange_request [ItemPublicTokenExchangeRequest] 
# @param [Hash] opts the optional parameters
# @return [Array<(ItemPublicTokenExchangeResponse, Integer, Hash)>] ItemPublicTokenExchangeResponse data, response status code and response headers
Exchange public token for an access token
Exchange a Link `public_token` for an API `access_token`. Link hands off the `public_token` client-side via the `onSuccess` callback once a user has successfully created an Item. The `public_token` is ephemeral and expires after 30 minutes.  The response also includes an `item_id` that should be stored with the `access_token`. The `item_id` is used to identify an Item in a webhook. The `item_id` can also be retrieved by making an `/item/get` request.
Exchange public token for an access token Exchange a Link ` public_token ` for an API ` access_token ` . Link hands off the ` public_token ` client - side via the ` onSuccess ` callback once a user has successfully created an Item . The ` public_token ` is ephemeral and expires after 30 minutes . The response also includes an ` item_id ` that should be stored with the ` access_token ` . The ` item_id ` is used to identify an Item in a webhook . The ` item_id ` can also be retrieved by making an ` / item / get ` request .
def item_public_token_exchange_with_http_info(item_public_token_exchange_request, opts = {})
      if @api_client.config.debugging
        @api_client.config.logger.debug 'Calling API: PlaidApi.item_public_token_exchange ...'
      end
      if @api_client.config.client_side_validation && item_public_token_exchange_request.nil?
        fail ArgumentError, "Missing the required parameter 'item_public_token_exchange_request' when calling PlaidApi.item_public_token_exchange"
      end
      local_var_path = '/item/public_token/exchange'
      query_params = opts[:query_params] || {}
      header_params = opts[:header_params] || {}
      header_params['Accept'] = @api_client.select_header_accept(['application/json'])
      header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
      form_params = opts[:form_params] || {}
      post_body = opts[:debug_body] || @api_client.object_to_http_body(item_public_token_exchange_request)
      return_type = opts[:debug_return_type] || 'ItemPublicTokenExchangeResponse'
      auth_names = opts[:debug_auth_names] || ['clientId', 'plaidVersion', 'secret']
      new_options = opts.merge(
        :operation => :"PlaidApi.item_public_token_exchange",
        :header_params => header_params,
        :query_params => query_params,
        :form_params => form_params,
        :body => post_body,
        :auth_names => auth_names,
        :return_type => return_type
      )
      data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
      if @api_client.config.debugging
        @api_client.config.logger.debug "API called: PlaidApi#item_public_token_exchange\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
      end
      return data, status_code, headers
    end
def item_public_token_exchange_with_http_info ( item_public_token_exchange_request , opts = { } ) if @api_client . config . debugging @api_client . config . logger . debug 'Calling API: PlaidApi.item_public_token_exchange ...' end if @api_client . config . client_side_validation && item_public_token_exchange_request . nil? fail ArgumentError , "Missing the required parameter 'item_public_token_exchange_request' when calling PlaidApi.item_public_token_exchange" end local_var_path = '/item/public_token/exchange' query_params = opts [ :query_params ] || { } header_params = opts [ :header_params ] || { } header_params [ 'Accept' ] = @api_client . select_header_accept ( [ 'application/json' ] ) header_params [ 'Content-Type' ] = @api_client . select_header_content_type ( [ 'application/json' ] ) form_params = opts [ :form_params ] || { } post_body = opts [ :debug_body ] || @api_client . object_to_http_body ( item_public_token_exchange_request ) return_type = opts [ :debug_return_type ] || 'ItemPublicTokenExchangeResponse' auth_names = opts [ :debug_auth_names ] || [ 'clientId' , 'plaidVersion' , 'secret' ] new_options = opts . merge ( :operation => :" PlaidApi.item_public_token_exchange " , :header_params => header_params , :query_params => query_params , :form_params => form_params , :body => post_body , :auth_names => auth_names , :return_type => return_type ) data , status_code , headers = @api_client . call_api ( :POST , local_var_path , new_options ) if @api_client . config . debugging @api_client . config . logger . debug "API called: PlaidApi#item_public_token_exchange\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data , status_code , headers end
Exchange public token for an access token
Exchange a Link &#x60;public_token&#x60; for an API &#x60;access_token&#x60;.
Exchange public token for an access token Exchange a Link &#x60 ; public_token&#x60 ; for an API &#x60 ; access_token&#x60 ; .
# verify the required parameter 'item_public_token_exchange_request' is set # resource path # query parameters # header parameters # HTTP header 'Accept' (if needed) # HTTP header 'Content-Type' # form parameters # http body (model) # return_type # auth_names
ItemPublicTokenExchangeResponse data, response status code and response headers
ItemPublicTokenExchangeResponse data response status code and response headers
Array<(ItemPublicTokenExchangeResponse, Integer, Hash)>
item_public_token_exchange_request
opts
None
opts the optional parameters
opts the optional parameters