500 Error when calling admin/ticket_fields

I am trying to call https://{{domain}}.freshdesk.com/api/v2/admin/ticket_fields where domain is my test domain but I keep getting a 500 error from the API. It works fine in Postman but not from the platform where I am making the call.

@RobAtOpinyin

can you please provide the code here you are trying to call that API in?

Hi @Umar

I am calling it from a Power Apps Custom Connector which is a low code environment so I can’t access the code that makes the call.

I would say plesae try removing “admin” from the call.

Try this https://{{domain}}.freshdesk.com/api/v2/ticket_fields

That works fine but the payload does not have all the information I need. I can only get that if I call it with admin in the call.

Well, that would be good if you can tell what information you are looking for which is not there with this call above.

Details of fields that have been archived. These do not appear in the call that does not have admin in it.

Alright, its my guess if you try section mapping that would help.

‘https://{{domain}}.freshdesk.com/api/v2/admin/ticket_fields?include=section’

response will be like:


[
{ 
      "id":20,
      "name":"cf_product_category",
      "label":"Product Category",
      "label_for_customers":"Product Category",
      "position":3,
      "type":"custom_dropdown",
      "default":false,
      "customers_can_edit":true,
      "required_for_closure":false,
      "required_for_agents":false,
      "required_for_customers":false,
      "displayed_to_customers":true,
      "created_at":"2019-12-16T07:12:07Z",
      "updated_at":"2019-12-16T09:35:26Z",
      "has_section":true,
      "sections": [
         {
            "id": 1,
            "label": "Ecosystem Type",
            "parent_ticket_field_id": 12,
            "choice_ids": [
               6
            ],
            "ticket_field_ids": [
               17,
               18,
               27
            ]
         }
      ]
   }
]

Hi @Umar

I tried adding section mapping and I still get a 500 error.

@RobAtOpinyin

Can you please share a screenshot where you mapping this API in power apps?

Hi @Umar

Are you familiar with creating Power Apps Customer Connectors? If not screen shots probably won’t help.

This call works fine in the custom connector:- https://opinyin-dev.freshdesk.com/api/v2/admin/groups

But this one generates a 500 error:- https://opinyin-dev.freshdesk.com/api/v2/admin/ticket_fields

Do you log 500 errors?

This is the error message I get back. It just occurred to me that it might not be one of yours.

{
  "message": "We're sorry, but something went wrong."
}

Hi @Umar

I have just identified its not a Freshdesk issue. Thanks for help with this and apologies for taking your time up. :frowning:

This was not a Freshdesk issue.

This topic was automatically closed 6 days after the last reply. New replies are no longer allowed.