Title: API isn&#8217;t working
Last modified: December 19, 2022

---

# API isn’t working

 *  Resolved [tiydo](https://wordpress.org/support/users/tiydo/)
 * (@tiydo)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/api-isnt-working/)
 * Hi,
 * I’m trying to create a ticket using API, but it didn’t work! 
   I’m using an online
   tool to curl called reqbin.com.The command I used:
 * `_curl --location --request POST 'https://mydomain.com/wp-json/fluent-support/
   v2/customer-portal/tickets?title=demoTitle&content=demoContent' \
   --header 'Authorization:
   BASIC s****a:7*** 6**G **** 4**t **** ***E' \
   _
 * The error is:
 * `_{
   "code": "rest\_forbidden","message": "Sorry, you are not allowed to do that.","
   data": {"status": 401}}
 * Can you please tell me what I can do? My application password and username weren’t
   wrong!
   Do I need to change any settings from my dashboard?
 * Thank you.

Viewing 1 replies (of 1 total)

 *  Plugin Support [Ahsan Chowdhury](https://wordpress.org/support/users/ahsannayem/)
 * (@ahsannayem)
 * [3 years, 5 months ago](https://wordpress.org/support/topic/api-isnt-working/#post-16320346)
 * Hello [@tiydo](https://wordpress.org/support/users/tiydo/) ,
 * Here is an example you can follow: [https://reqbin.com/req/php/c-2cd3jxee/curl-post-with-basic-authentication-example](https://reqbin.com/req/php/c-2cd3jxee/curl-post-with-basic-authentication-example)
 * Here is the code I used and it worked fine: 
 * `curl -X POST https:yoursiteurl.com/wp-json/fluent-support/v2/customer-portal/
   tickets -H "Content-Type: application/json" -d '{"title": "This is title", "content":"
   This is content"}' --user "username:password"`
 * Thank you

Viewing 1 replies (of 1 total)

The topic ‘API isn’t working’ is closed to new replies.

 * ![](https://ps.w.org/fluent-support/assets/icon.svg?rev=2628677)
 * [Fluent Support - Helpdesk & Customer Support Ticket System](https://wordpress.org/plugins/fluent-support/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/fluent-support/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/fluent-support/)
 * [Active Topics](https://wordpress.org/support/plugin/fluent-support/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/fluent-support/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/fluent-support/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Ahsan Chowdhury](https://wordpress.org/support/users/ahsannayem/)
 * Last activity: [3 years, 5 months ago](https://wordpress.org/support/topic/api-isnt-working/#post-16320346)
 * Status: resolved