Uncaught exception 'CheddarGetter_Response_Exception' with message 'Not Authorized
I'm getting the following PHP error:
Fatal error: Uncaught exception 'CheddarGetter_Response_Exception' with message 'Not Authorized: Authentication required' in /html/application/libraries/CheddarGetter.php:776 Stack trace: #0 /html/application/libraries/CheddarGetter.php(576): CheddarGetter_Response->handleError() #1 /html/application/libraries/CheddarGetter.php(299): CheddarGetter_Response->__construct('<?xml version="...') #2 /html/application/controllers/test.php(10): CheddarGetter->newCustomer(Array) #3 [internal function]: Test->index() #4 /html/system/codeigniter/CodeIgniter.php(232): call_user_func_array(Array, Array) #5 /html/dispatch.php(117): require_once('/usr/share/ngin...') #6 {main} thrown in /html/application/libraries/CheddarGetter.php on line 776
I'm pretty sure I provided the API with the correct login information. It's the email address and password I use to log into my dashboard. Now, I don't remember the product code I set when I created the product, and can't find it anywhere in the dashboard, so I am wondering if maybe I am passing the wrong one. Could that be the issue?
Discussions are closed to public comments.
If you need help with Cheddar please
start a new discussion.
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
Support Staff 1 Posted by Marc Guyer on 20 Aug, 2009 10:28 PM
Hey Mike -- Yeah, I've seen this error today. The easiest way to test the api is from the command line using cURL. Try this:
You should receive this response:
Then, you can throw your product code in there to get something meaningful:
If you're username:password is incorrect, you'll get this:
You can also use wget but it's a little less friendly:
If you're on Windows, you can get curl here but I've never tried that. There are other tools for Windows but, again, I haven't used any of them.
2 Posted by Mike Keen on 20 Aug, 2009 10:54 PM
Thanks Marc. That was very helpful. I am now getting the following error in CURL:
Is my account not authorized to access the API? The only reason I can figure for this is that I haven't entered my authorize.net information into my dashboard yet. This is because I'm still in the process of getting that established. If at all possible, I'd really like to be able to test the API before I input that.
3 Posted by Mike Keen on 20 Aug, 2009 11:22 PM
Thanks Marc. That was very helpful. It will be nice to test things via the command line instead of PHP.
Now I've got it giving me a completely different error message.
Does my account not have access to the API for some reason? Could it be because I haven't provided my Authorize.net account information yet? If so, is there any way to make an exception? I'm trying to launch my product, and I'd really like to get all the customer management stuff finalized and I don't want to wait for that account to be established. It's in the process of being opened, but I think it will be a week or so before all that is finalized.
Apologies if this is a duplicate post. It looks like Tender went down just as I posted my last reply.
4 Posted by Mike Keen on 21 Aug, 2009 07:16 PM
Thanks Marc. Your answer was very helpful.
I've now been able to verify that I am using all of the correct login/product information using the debugging methods you suggested. However, I'm now running into the following error message:
I was getting this one when I was using the incorrect login information:
So clearly (to me) my account doesn't have access to the API for some reason. Is this because I haven't given you guys my Authorize.net information yet? The reason I haven't provided it is because we're still in the process of getting that account established. Is there any way we can get access to the API in the meantime in order to finalize our customer stuff for our Website?
FYI, this is the third time I've tried to post this message. I think Tender is having some serious issues ATM.
Support Staff 5 Posted by Marc Guyer on 21 Aug, 2009 09:04 PM
Mike -- You've found a bug. We've fixed it. You were unintentionally disallowed from using the API.
Marc Guyer closed this discussion on 21 Aug, 2009 09:04 PM.
Mike Keen re-opened this discussion on 21 Aug, 2009 09:08 PM
6 Posted by Mike Keen on 21 Aug, 2009 09:08 PM
Cool, thanks for looking into it and fixing this so quickly.
Support Staff 7 Posted by Marc Guyer on 21 Aug, 2009 09:16 PM
Hey -- No problem. We actually fixed it right after receiving your message but we all had to leave for a bit to dunk a friend of ours in a dunk tank.
Marc Guyer closed this discussion on 21 Aug, 2009 09:16 PM.
Mike Keen re-opened this discussion on 21 Aug, 2009 09:28 PM
8 Posted by Mike Keen on 21 Aug, 2009 09:28 PM
Far be it for me to ever come between a group of friends and a dunk tank! Happy Friday, and have a great weekend!
Support Staff 9 Posted by Marc Guyer on 16 Mar, 2010 04:15 PM
Mike -- We just discovered that a couple of your messages from back in August where caught as spam by Tender. Sorry we missed that. Are you still using CG? How are things going?
10 Posted by Mike Keen on 16 Mar, 2010 08:16 PM
Hey Marc,
I am still planning to use it. The integration is all good to go. Just
waiting for some funding-related things to fall into place, which should be
soon.
Thanks for checking in.
Mike
Marc Guyer closed this discussion on 18 Mar, 2010 08:52 PM.
Marc Guyer re-opened this discussion on 17 May, 2010 08:32 PM
Support Staff 11 Posted by Marc Guyer on 17 May, 2010 08:32 PM
Hey Mike -- Just checking back in with you. I was curious whether anyone had created anything for CodeIgniter and ran across this post again. Did you use the PHP wrapper as-is or write your own or extend for CI or... ? How's everything else going?
12 Posted by Loren Davie on 12 Jul, 2010 10:31 PM
Hi - I'm getting the exact same behavior on an account I have - we also configured Authorize.net, and I'm confident we are using the correct username and password. I'm using the Python client (which works fine on other accounts).
Any help would be most appreciated, thanks!
Support Staff 13 Posted by Marc Guyer on 13 Jul, 2010 04:05 PM
Hi Loren!
Can you provide the exact error message and the exact time at which it occurs?
Can you log into the CG GUI directly using the same username/password and access the same product?
14 Posted by Loren Davie on 13 Jul, 2010 07:00 PM
Hi Marc,
The error message was a 401 Response "API Access Unauthorized". I have
an occurrence of it on 7/11 around 6:25 PM EDT.
I have been able to log into the GUI successfully using the same
credentials. We've triple-checked to make sure we have no typos in the
credentials.
I just tried it again now, and I am not able to reproduce the error.
Yesterday as of about 6:30 pm EDT I was able to reliably produce the error
- perhaps you've changed something between then and now (its all the same on
my end).
Support Staff 15 Posted by Marc Guyer on 14 Jul, 2010 12:27 PM
Loren -- Yes, we did fix your account. You should be good to go. Please do let us know if you have further problems!
Marc Guyer closed this discussion on 14 Jul, 2010 12:27 PM.