简体   繁体   中英

how can I get response returned by Plaid api using script

I am trying to connect to the Plaid api using Ruby. But I am trying to connect it using <script> tag. I have successfully connected to their api and there is a json object returned in the response as I can see it in browser's console. But I am unable to get it in my code. My code is

    <%= form_for :user, method: :get, :html => { :id => "link-form-id" } do |f| %>
<% end %>

<script
  src="https://cdn.plaid.com/link/stable/link-initialize.js"
  data-client-name="Mandeep"
  data-client-id="**********"
  data-form-id="link-form-id"
  data-key="***********"
  data-product="auth"
  data-env="tartan">
</script>

This code returns json object in url as well. I dont understand how can I get it from <script> tag. I have searched all over the web but couldn't get any useful stuff. Can you please help me to find this out. Your help would be appreciated. Thanks

由于表单的方法是“ GET”,因此您需要解析查询字符串以检索“格子链接” public_token(因此,您将需要在查询字符串中查找“ public_token”字段)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM