API Forum

This forum is in read-only mode.
Please refer to our API support in case you have any questions.
We can be reached at api@e-conomic.com
e-conomic API developer forum

Ruby r-conomic API - unable to connect

Hi all,

I'm trying to use Ruby and the r-conomic API to connect to my e-conomic account (https://github.com/substancelab/rconomic).

However, I keep getting stuck at the very starting point.
My code is as below:

Dir.chdir 'C:\Ruby23\bin'
require 'rconomic'
economic = Economic::Session.new
economic.connect_with_token 'the_private_app_id', 'the_access_id_you_got_from_the_grant'

The IDs have been replaced as follows:
- The private app ID reflects the ID I have to the left when I create a new App in the developer access of e-conomic
- The grant ID reflects the ID that pops up when I use my regular account to provide access for the App

I am running Ruby 2.3.3 (have tried also 2.2.6) and have tried both on Win7 and Win10. However, I keep getting the below error message.

I'm not sure if I lack some gem, if my installation is wrong, if I am using the wrong IDs or something else.

Any help would be much appreciated!

C:/Ruby23/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/httpi/adapter/net_http.rb:51:in `rescue in request': SSL_connect returned=1 errno=0 state=error: certificate verify failed (HTTPI::SSLError)
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/httpi/adapter/net_http.rb:33:in `request'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/httpi.rb:161:in `request'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/httpi-2.4.2/lib/httpi.rb:133:in `post'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/savon-2.11.1/lib/savon/operation.rb:94:in `block in call_with_logging'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/savon-2.11.1/lib/savon/request_logger.rb:12:in `log'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/savon-2.11.1/lib/savon/operation.rb:94:in `call_with_logging'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/savon-2.11.1/lib/savon/operation.rb:54:in `call'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/savon-2.11.1/lib/savon/client.rb:36:in `call'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/rconomic-0.5.2/lib/economic/endpoint.rb:74:in `request'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/rconomic-0.5.2/lib/economic/endpoint.rb:20:in `call'
    from C:/Ruby23/lib/ruby/gems/2.3.0/gems/rconomic-0.5.2/lib/economic/session.rb:22:in `connect_with_token'
    from C:/Ruby22/bin/rconomic_test.rb:8:in `<main>'
created Mar 4 by Mar
0% Accept Rate
Q 2 A 0 C 0

Visma e-conomic A/S