Happy Business Starts Here

Honor Student

Invalid login error first time starting Rails server for connect starter package

I've just started to build an app for the Marketplace using the connect-starter-package on GitHub. I put my zuora_logina and zuora_password credentials into secrets.yml, but I'm still seeing the follwowing error when I start up the server. Any ideas?

 

ZuoraAPI::Exceptions::ZuoraAPISessionError in Products#index

 

Invalid login, please check username and password or URL endpoint

 

Extracted source (around line #29):
27
28
29
30
31
32
              
<div class="panel-body">
<pre class="prettyprint">
<%= JSON.pretty_generate(@appinstance.target_login.client.rest_call(:url => @appinstance.target_login.client.rest_endpoint("catalog/products"))[0]) %>
</pre>
</div>
</div>
6 REPLIES 6
Zuora Staff

Re: Invalid login error first time starting Rails server for connect starter package

Hi Sophie,

 

There are a few steps we can try to resolve your issue.

 

1. Ensure that the server is restarted after updating the secrets file. This file is only loaded in on server start.

 

2. Make sure the URL  in the secrets file(zuora_url) matches the URL that the credentials should be authenticated against. The default in the starter package assumes a sandbox environment. 

 

You can look at the below examples for how the URL could be configured based on the environment you are trying to use

Sandbox: https://apisandbox.zuora.com/apps/services/a/81.0

Production: https://zuora.com/apps/services/a/81.0

Services: https://services432.zuora.com/apps/services/a/81.0

Performance: https://pt1.zuora.com/apps/services/a/81.0

 

3. Check the format of the secrets file

 

As the secrets file is YAML it is very picky on indentation and spacing. I posted an example below that you could use

 

 

development:
  secret_key_base:
  starter_pack:
    zuora_login: login
    zuora_password: password
    zuora_url: https://apisandbox.zuora.com/apps/services/a/81.0

 

If you are still encountering the same issue after running through the above steps please let me know!

 

Thank you,

Matthew Ingle

 

Honor Student

Re: Invalid login error first time starting Rails server for connect starter package

Hi Matthew,

 

Thank you for the quick response and good to "meet" you (my coworker Todd connected us by email earlier this week)! I tried the following steps, but still no luck. I assume that I should be in a sandbox environment, since I'm currently trying to build an app for the marketplace and, in fact, that was the url I initially had in my secrets file. Here's what my secrets looks like currently:

 

development:
  secret_key_base: [key I generated by running 'rake secret']
  connect:
  key: [API token from my Zuora Connect account]
starter_pack:
  zuora_login: ** (edited out per moderator)
  zuora_password: [password to log into above account]
  zuora_url: https://apisandbox.zuora.com/apps/services/a/81.0

 

Does anything here jump out at you?

Highlighted
Zuora Staff
Zuora Staff

Re: Invalid login error first time starting Rails server for connect starter package

Hi Sophie,

 

Did you restart your server after updating your secrets file?

Honor Student

Re: Invalid login error first time starting Rails server for connect starter package

Hi Bao,

 

Yes, I did restart the server.

Honor Student

Re: Invalid login error first time starting Rails server for connect starter package

Friendly bump; I'm still seeing the same issue. I'm starting to worry that my account (tech@priceintelligently) isn't properly configured for the API sandbox: any way to check that on your end?

Zuora Alumni

Re: Invalid login error first time starting Rails server for connect starter package

What is your sandbox id?



If you found my answer helpful, please give me a kudo ↑
Help others find answers faster by accepting my post as a solution √