I am using osTicket 1.7 and am trying to set up the automatic pop/imap mail polling.

I have set up automatic task schedules with my server to access api/cron.php

I have set up an api key to look from the originating IP address of the scheduler.

I have no idea where I am supposed to set up the API key on the server.

I have read the following set of instructions...

Recurring tasks scheduler (host's custom task scheduler)

Some hosts do not allow adding cron jobs, and instead only allow you to probe scripts located at a publicly accessible URL. In this case, you will schedule the task using your webhost's scheduling interface and http://domain/path/to/osticket/api/cron.php(http://domain/path/to/osticket/api/cron.php).

To prevent unauthorized execution of scripts from the outside, Settings => API has rules for allowing external access based on originating IP and an API "passphrase", which is actually the User Agent string of the agent trying to access cron.php on your web server.

If the User Agent string is not changed to the API key, the request will be denied, email will not be polled, and API error - code #77: Unknown remote host or invalid API key will appear in your system logs under the osTicket dashboard.

If your host allows you to modify their schedulers User Agent string, then change that to the API key and add your webhost scheduler's IP to Settings => API => API Keys.

My server doesn't seem to allow piping, so I have been trying to make osticket work with this email polling method. I can't figure out how to modify the user agent string. This was not an available option with my servers control panel at the time of scheduling a task.

I am using an iPower web hosting plan.

SQL 5.0.91

PHP 5.3.13

User Interface - vDeck v.4

My error log is showing API error #77 saying that an API key is required.

Any help will definately be appreciated. Thanks in advance.

Call cron.php using system (local) path, not the http interface. i.e /www/path/to/cron.php

My web-server has the "http://servername.com" before the entry box in it's task scheduler....so it doesn't seem to be looking for the local path.....and I can not remove http://servername.com(http://servername.com) from before the entry box.

I tried it based on your suggestion...and while I did not see an error log in osticket for the time that I had that task scheduled for, it did not fetch the new emails either.

Thanks for the response. Do you think I'm SOL as long as I am using this server host?

a month later

API error - code #77 polling with full URL

I am having the same problem. Similarly, my host does not allow for Cron jobs using the local path. It forces the full public URL to my base folder (http://myserver.myhost.com/myaccountname(http://myserver.myhost.com/myaccountname)). osTicket is polling my email and creating tickets, but continues to throw this error every time.

I understand that I will have to generate an API key based on the IP address of the server (easily found in the error message), which I have done. What I need is the format for specifying that API in the URL; example: http://myserver.myhost.com/myaccountname/osticiket/api/cron.php(http://myserver.myhost.com/myaccountname/osticiket/api/cron.php)?aipkey=0123456789876543210

I have searched the posts and support articles thoroughly, and while I found the instructions for generating the API, I have not seen the format for using it in a publically accessable URL

I thank you all in advance for your help!

- Brandon M. Trube

My web-server has the "http://servername.com" before the entry box in it's task scheduler....so it doesn't seem to be looking for the local path.....and I can not remove http://servername.com(http://servername.com) from before the entry box.

I tried it based on your suggestion...and while I did not see an error log in osticket for the time that I had that task scheduled for, it did not fetch the new emails either.

Thanks for the response. Do you think I'm SOL as long as I am using this server host?

2 years later

Hi, I also have this problem. I need to know how to pass the api-key/passphrase to the external URL (which is the only format my webserver accepts). Very thankful for any help on the matter! :-)blank

@henkemailso you are running osTicket 1.7?I think that perhaps you shouldn't zombie threads and might want to start your own.

Write a Reply...