# API configuration problem, consult your administrator

**URL:** https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635
**Category:** Integrating with Xibo
**Created:** [July 10, 2023, 7:32am UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635 "2023-07-10T07:32:19Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![dp\_it2all](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@dp\_it2all](https://community.xibo.org.uk/u/dp_it2all)
#### Post date: [July 10, 2023, 7:32am UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/1 "2023-07-10T07:32:19Z")

</div>

Hey,

I’ve got the problem that I can’t get a access\_token via Postman. I’ve already found the articles with the private, public and encryption key but none of the ideas have worked at my XIBO version. I’m hosting XIBO on a Linux System and the server is on the version 3.3.3.

Have you got any ideas to solve the problem?

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [July 10, 2023, 7:36am UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/2 "2023-07-10T07:36:56Z")

</div>

Hey,

A full error message will be recorded in your CMS logs, so the first place to check is there. You can filter the “channel” by `AUTH` to see only messages related to the endpoint which issues access tokens.

---

<div class="post-metadata">

### Author: ![dp\_it2all](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@dp\_it2all](https://community.xibo.org.uk/u/dp_it2all)
#### Post date: [July 10, 2023, 7:46am UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/3 "2023-07-10T07:46:36Z")

</div>

If I check the logs there is nothing in the channel AUTH… the only message I’ve got is in Postman  
 ![image](https://community.xibo.org.uk/uploads/default/original/2X/5/5db6e5b1cb3a3aa4f93c08551e2487b8221d1f29.png)

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [July 10, 2023, 10:51am UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/4 "2023-07-10T10:51:47Z")

</div>

![image](https://community.xibo.org.uk/uploads/default/original/2X/f/f7d1fe625a55d95626d71ce2b09767f069e65428.png)

Xibo definitely logs an error immediately before that message is raised. Can you make sure your log level is set to error or higher and repeat?

Aside from that I suggest upgrading to the latest 3.3 release (currently 3.3.6)

---

<div class="post-metadata">

### Author: ![dp\_it2all](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@dp\_it2all](https://community.xibo.org.uk/u/dp_it2all)
#### Post date: [July 10, 2023, 1:20pm UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/5 "2023-07-10T13:20:09Z")

</div>

So the only error log I found is on the Server…

 ![image](https://community.xibo.org.uk/uploads/default/original/2X/c/cdf09c67553659df6fa283c38b0485d22916cc3a.png)

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [July 10, 2023, 3:14pm UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/6 "2023-07-10T15:14:12Z")

</div>

If we can’t get that message logged into the CMS logs then we are essentially guessing. Please can you try and set your CMS “server mode” to “Test” and then repeat your access token request to see if anything further is output or logged?

---

<div class="post-metadata">

### Author: ![dp\_it2all](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@dp\_it2all](https://community.xibo.org.uk/u/dp_it2all)
#### Post date: [July 11, 2023, 8:16am UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/7 "2023-07-11T08:16:40Z")

</div>

So after I changed the XIBO server mode to test I’ve got this error message:

  
**Deprecated** : Method ReflectionParameter::getClass() is deprecated in **/var/www/vhosts/customer.net/shoptv.customer.net/vendor/php-di/php-di/src/Invoker/FactoryParameterResolver.php** on line **45**  
  
**Warning** : file\_get\_contents(/var/www/vhosts/customer.net/ShopTV-Medien/certs/encryption.key): Failed to open stream: No such file or directory in **/var/www/vhosts/customer.net/shoptv.customer.net/lib/Service/ConfigService.php** on line **600**  
  
**Deprecated** : Method ReflectionParameter::getClass() is deprecated in **/var/www/vhosts/customer.net/shoptv.customer.net/vendor/php-di/php-di/src/Invoker/FactoryParameterResolver.php** on line **45**  
  
**Deprecated** : Method ReflectionParameter::getClass() is deprecated in **/var/www/vhosts/customer.net/shoptv.customer.net/vendor/php-di/php-di/src/Invoker/FactoryParameterResolver.php** on line **45**  
  
**Deprecated** : Method ReflectionParameter::getClass() is deprecated in **/var/www/vhosts/customer.net/shoptv.customer.net/vendor/php-di/php-di/src/Invoker/FactoryParameterResolver.php** on line **45**  
{"error":0,"message":"API configuration problem, consult your administrator"}

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [July 11, 2023, 10:04am UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/8 "2023-07-11T10:04:05Z")

</div>

> [@dp\_it2all](#):
>
> **Warning** : file\_get\_contents(/var/www/vhosts/customer.net/ShopTV-Medien/certs/encryption.key): Failed to open stream: No such file or directory in **/var/www/vhosts/customer.net/shoptv.customer.net/lib/Service/ConfigService.php** on line **600**

The API requires a pub/private RSA keypair and an encryption key to be provided. The docker entrypoint will create these in `/library/certs`.

As you’re installing manually you’ll need to provide these yourself. You can override the generated keys paths and encryption key by providing an alternative in `settings-custom.php`.  
For example:

```php
$apiKeyPaths = [
    'publicKeyPath' => '/var/www/cms/custom/public.key',
    'privateKeyPath' => '/var/www/cms/custom/private.key',
    'encryptionKey' => ''
];

```

---

<div class="post-metadata">

### Author: ![dp\_it2all](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@dp\_it2all](https://community.xibo.org.uk/u/dp_it2all)
#### Post date: [July 11, 2023, 10:22am UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/9 "2023-07-11T10:22:59Z")

</div>

Is there a specific folder where the settings-custom.php is installed?

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [July 11, 2023, 10:25am UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/10 "2023-07-11T10:25:18Z")

</div>

Yes, you place that file inside your `custom/` folder.

Alternatively you can put the public.key, private.key and encryption.key in the location specified in the error message you see, namely `/var/www/vhosts/customer.net/ShopTV-Medien/certs/`. If you do this then a custom settings file is not required and the CMS will take those files from that location.

---

<div class="post-metadata">

### Author: ![dp\_it2all](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@dp\_it2all](https://community.xibo.org.uk/u/dp_it2all)
#### Post date: [July 11, 2023, 11:32am UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/11 "2023-07-11T11:32:39Z")

</div>

So I just moved the files into the folder, that the server is using and it seems to work. But how can I remove all the other errors?  
  
  
**Deprecated** : Method ReflectionParameter: :getClass() is deprecated in **/var/www/vhosts/customer.net/shoptv.customer.net/vendor/php-di/php-di/src/Invoker/FactoryParameterResolver.php** on line **45**  
  
  
  
**Deprecated** : Method ReflectionParameter: :getClass() is deprecated in **/var/www/vhosts/customer.net/shoptv.customer.net/vendor/php-di/php-di/src/Invoker/FactoryParameterResolver.php** on line **45**  
  
  
  
**Deprecated** : Method ReflectionParameter: :getClass() is deprecated in **/var/www/vhosts/customer.net/shoptv.customer.net/vendor/php-di/php-di/src/Invoker/FactoryParameterResolver.php** on line **45**  
  
  
  
**Deprecated** : Method ReflectionParameter: :getClass() is deprecated in **/var/www/vhosts/customer.net/shoptv.customer.net/vendor/php-di/php-di/src/Invoker/FactoryParameterResolver.php** on line **45**  
  
{  
“error”: 0,  
“message”: “API configuration problem, consult your administrator”  
}

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [July 11, 2023, 12:05pm UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/12 "2023-07-11T12:05:21Z")

</div>

Those other deprecations are being output due to the CMS being in “Test” mode. However, are you sure you’re running a supported version of PHP?

v3.3 does not support PHP8 (7.4 max).

v4.0 will support PHP 8.1+.

---

<div class="post-metadata">

### Author: ![dp\_it2all](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@dp\_it2all](https://community.xibo.org.uk/u/dp_it2all)
#### Post date: [July 11, 2023, 1:06pm UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/13 "2023-07-11T13:06:50Z")

</div>

So I’m currently working on PHP 8 but only v3.3.3 of XIBO… is there any chance I can get the CMS to work with this configuration or do I have to downgrade my PHP version back to 7.4.?

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [July 11, 2023, 1:38pm UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/14 "2023-07-11T13:38:28Z")

</div>

> [@dp\_it2all](#):
>
> I have to downgrade my PHP version back to 7.4.

Correct 👍

PHP8 is not supported by any CMS earlier than v4 which is currently in alpha. You should run PHP 7.4 to use Xibo 3.3.

We do not recommend running v4 in production yet, but we will have a release candidate available in 1 month which you could run in production if you wanted. That would allow you to keep with PHP 8.1+.

---

<div class="post-metadata">

### Author: ![dp\_it2all](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@dp\_it2all](https://community.xibo.org.uk/u/dp_it2all)
#### Post date: [July 14, 2023, 9:22am UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/15 "2023-07-14T09:22:15Z")

</div>

So now I’ve downgraded PHP back to 7.4. but still, when I try to get an access token via postman I’ve got the same error message. Even when I put the system into Test mode there is no more info about the error. It is just the same error message as always.

![image](https://community.xibo.org.uk/uploads/default/original/2X/2/2dd2d53b44fa3e3354a9d6a45b8103f6fe1d78d5.png)

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [July 14, 2023, 1:42pm UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/16 "2023-07-14T13:42:09Z")

</div>

There will be an error log recorded with the exact details - if you log into the CMS and go to Advanced → Logs. Recreate the issue and then press refresh.You should see a log in the AUTH channel explaining what the problem is.

The only reported errors we’ve ever had of this type of issues is with those keys not being present or being incorrectly configured.

Maybe this is a permissions issue on those files - these are the permissions we set in the container::

```auto
chmod 600 /var/www/cms/library/certs/private.key
chmod 660 /var/www/cms/library/certs/public.key

```

Obviously you’d need yours in here: `/var/www/vhosts/customer.net/ShopTV-Medien/certs/`

---

<div class="post-metadata">

### Author: ![dp\_it2all](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@dp\_it2all](https://community.xibo.org.uk/u/dp_it2all)
#### Post date: [July 17, 2023, 8:49am UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/17 "2023-07-17T08:49:23Z")

</div>

I’ve put the private and public key into the same folder as the encryption key but still the CMS isn’t working… there are no Logs in the AUTH channel, there is only one in the PLAYER channel but I am pretty sure, that this isn’t the problem

 ![image](https://community.xibo.org.uk/uploads/default/original/2X/9/9d15b8280154b2bea4709e3027a20c7994660a4d.png)  
(screenshot of the error message)

There are no other logs at all. Is there another thing I can try to get the CMS to work?

---

<div class="post-metadata">

### Author: ![dp\_it2all](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@dp\_it2all](https://community.xibo.org.uk/u/dp_it2all)
#### Post date: [July 17, 2023, 9:19am UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/18 "2023-07-17T09:19:40Z")

</div>

Okay, so I think that I’ve found the problem…

 ![image](https://community.xibo.org.uk/uploads/default/original/2X/9/9ec252d70688d70ff3443fabd50bfcf6488b01ea.png)

The problem is that the file is in the folder but still I’m getting the same message. Do I have to give the private.key any permission in another file or why can’t the CMS read the file?

---

<div class="post-metadata">

### Author: ![dan](https://community.xibo.org.uk/user_avatar/community.xibo.org.uk/dan/32/9115_2.png) [@dan](https://community.xibo.org.uk/u/dan)
#### Post date: [July 18, 2023, 9:33am UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/19 "2023-07-18T09:33:41Z")

</div>

Tracing through the error, I think it can see the file and the file is readable, but it can’t parse it as a valid key.

Did you put a pass phrase on your private key? If so then please try without one.

---

<div class="post-metadata">

### Author: ![dp\_it2all](https://community.xibo.org.uk/letter_avatar_proxy/v4/letter/d/bbce88/32.png) [@dp\_it2all](https://community.xibo.org.uk/u/dp_it2all)
#### Post date: [July 18, 2023, 10:08am UTC](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635/20 "2023-07-18T10:08:33Z")

</div>

I tried it with a pass phrase but also without and both ways I’ve got the same error message

[Next page](https://community.xibo.org.uk/t/api-configuration-problem-consult-your-administrator/29635.md?page=2)
