bunq / sdk_php

PHP SDK for bunq API
MIT License
84 stars 54 forks source link

Error: apiContext has not been loaded. #128

Closed jimkaler closed 6 years ago

jimkaler commented 6 years ago

By following this example, when I calling data from bunq.conf file and try to get user. I am getting error, "apiContext has not been loaded.", I dont know what I am doing wrong here. Can anyone help me out please? @OGKevin

jimkaler commented 6 years ago

here is code and error: error

code

mbernson commented 6 years ago

Hello @jagdishkaler,

You're probably getting this error because you used the sample code from the SDK, which is outdated at this moment. 🤦‍♂️

You can fix it by adding the following line right after you've set up your ApiContext:

BunqContext::loadApiContext($apiContext);

To get sample code that does work, try our new API tinker project. It only takes one command to install and set up: https://www.bunq.com/developer

jimkaler commented 6 years ago

Hey @mbernson thanks for reply, My i get full code example ? Thanks.

jimkaler commented 6 years ago

Thanks @mbernson Sir, It works for me.

Thanks alot.