Do we need to validate something in order to create a Test account

Solved!
Posted in General by Sumit Thu Nov 17 2016 07:47:06 GMT+0000 (UTC)·3·Viewed 1,281 times

Hi, I created a test account (sandbox account) and am trying to use your API in my RoR application. Upon hitting RAP api, am getting "Invalid Auth Token.". Though am setting right auth token. Do I need to do somethng related to verification before I can use your sandbox apis
Sumit
Nov 17, 2016

below is code snippet which I borrowed from your github post https://github.com/Instamojo/Instamojo-rb
api = Instamojo::API.new(AppConfig::INSTAMOJO_API_KEY, AppConfig::INSTAMOJO_API_TOKEN)
client = api.client
payment_request = client.payment_request({amount: 100, purpose: 'api', send_email: true, email: 'dummyname@gmail.com', redirect_url: 'http://dummyname.com'})

Instamojo
Nov 18, 2016

Quoting from the docs:

Note: If you're using this wrapper with our sandbox environment https://test.instamojo.com/
then you should pass 'https://test.instamojo.com/api/1.1/' as third argument to the Instamojo
class while initializing it. API key and Auth token for the same can be obtained from
https://test.instamojo.com/developers/ (Details: Test Or Sandbox Account).

Hence, passing 'https://test.instamojo.com/api/1.1/' as third argument to Instamojo::API.new will fix the issue.


Instamojo marked this as solved
Markdown is allowed