I’ve deployed FreePBX business app to DO droplet server. As I was following this guide (https://sangomakb.atlassian.net/wiki/spaces/PG/pages/25690223/REST+API) I could not get new access token. It gives me an eror “invalid client”. Here is my configuration in Postman. I could not fill the available token input (bearer token). I am not sure where I can get it. New token configuration has same data with one in my FreePBX web admin panel. Please let me know what I’ve missed.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Sign up for Infrastructure as a Newsletter.
Working on improving health and education, reducing inequality, and spurring economic growth? We'd like to help.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Hi there!
This error typically points to an issue with the OAuth client credentials or the configuration in Postman. Here are a few things that I would recommend checking:
1. Verify OAuth Client Credentials
Ensure that the OAuth client credentials used in Postman match exactly with those configured in FreePBX. These credentials are usually set up in the FreePBX administration interface.
2. Correct Postman Configuration
In Postman, setting up the request for an access token should be done carefully:
POST
.http(s)://<your-freepbx-server>/admin/api/api/token
).x-www-form-urlencoded
.grant_type
: should be set toclient_credentials
.client_id
: your OAuth client ID.client_secret
: your OAuth client secret.3. Check Redirect URI
Make sure that the redirect URI in your OAuth client configuration in FreePBX matches with any URI you’re using in Postman. Sometimes, even if not used, a mismatch can cause issues.
4. FreePBX Configuration
Ensure that your FreePBX instance is properly configured to handle REST API requests:
5. Server Response
Carefully examine the response you’re getting from the server:
Also, make sure that there are no network issues or firewalls blocking your request from Postman to your FreePBX server.
On another note, sometimes, simply refreshing the settings or restarting the FreePBX server can resolve unexpected glitches.
Best,
Bobby