def create_token
      client = Plaid::Client.new(env: PlaidRails.env,
        client_id: PlaidRails.client_id,
        secret: PlaidRails.secret,
        public_key: PlaidRails.public_key)
      if link_params['access_token']
        response = client.item.public_token.create(link_params['access_token'])
        render json: {public_token: response['public_token']}.to_json
      else
        render json: {error: 'missing access_token'}.to_json, status: 500
      end
    end
def create_token
      client = Plaid::Client.new(env: PlaidRails.env,
        client_id: PlaidRails.client_id,
        secret: PlaidRails.secret,
        public_key: PlaidRails.public_key)
      if link_params['access_token']
        response = client.item.public_token.create(link_params['access_token'])
        render json: {public_token: response['public_token']}.to_json
      else
        render json: {error: 'missing access_token'}.to_json, status: 500
      end
    end
creates a new public token
 /plaid/create_token