You have to be logged in to perform this action

i want to make a API call to freshdesk to view tickets in my fresh desk account but i get error you have to be logged in to perform this action. i shared my code and console error for your reference if you have any solution for this please let me know.

This is my code

This is my browser console output

Is the API key base64 encoded?

i taked api key from freshdesk profile setting and paste it into my apikey field. i don’t know it’s base64 encoded or not


you need to encode the API to make it work on Freshdesk

try this :point_down:

headers: {
            Authorization: `Basic ${btoa(api_key)}`,
            'content-type': 'application/json'

Hope this will work


It’s works Thank you … :blush: