Kazoo CDR API Authentication issue

391 views
Skip to first unread message

m.l...@mergedcomms.com

unread,
Jan 26, 2014, 4:55:36 PM1/26/14
to 2600h...@googlegroups.com

I would like to fetch CDR records from kazoo using kazoo-php-api (https://github.com/2600hz/kazoo-php-sdk). 
I have installed and configured username, password and siprealm for one of the admin accounts but each time I are getting 'invalid credentials' error.

Can you advise which username,password and realm we should use to fetch information? Or is an API key a better idea? How do I generate one?


Thanks

Martin Splinter

unread,
Jan 26, 2014, 7:41:38 PM1/26/14
to 2600h...@googlegroups.com
i dont know about the php sdk, but creating an api key can be done by creating an account in kazoo and then enable the developers app in the appstore to view te info

Op zondag 26 januari 2014 22:55:36 UTC+1 schreef m.l...@mergedcomms.com:

Phil Mickelson

unread,
Jan 27, 2014, 10:19:39 AM1/27/14
to 2600h...@googlegroups.com
I've been testing this also.  I've found success by using an auth code.  So, the curl call would be in the format of:

{url}/accounts/{account guid}/cdrs?auth_token={your auth token}

In my case the information returned is newest to oldest.  You might also want to consider date/time restrictions.  In that case don't forget that you have to convert UTC time to Gregorian (Erlang) time by adding 62167219200 to UTC time value.  So, your curl call would now be:

{url}/accounts/{account guid}/cdrs?auth_token={your auth token}&created_from={gregorian_date_time_from}&created_to={gregorian_date_time_to}

Hope this helps!
Phil M

m.l...@mergedcomms.com

unread,
Jan 27, 2014, 12:12:09 PM1/27/14
to 2600h...@googlegroups.com
Many thanks for the help Martin, will give this a go.

m.l...@mergedcomms.com

unread,
Jan 27, 2014, 12:12:26 PM1/27/14
to 2600h...@googlegroups.com
Many thanks for the help Phil, will give this a go too.

BelTex ISP

unread,
Jan 27, 2014, 2:35:15 PM1/27/14
to 2600h...@googlegroups.com
No problem, i love free support and its really not a big deal to answer if u think u know smth.



m.l...@mergedcomms.com schreef op 27-1-2014 18:12:
--
You received this message because you are subscribed to a topic in the Google Groups "2600hz-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/2600hz-dev/-1x3HoJXkoE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to 2600hz-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply all
Reply to author
Forward
0 new messages