Vor Kurzem aufgerufene Suchen


Keine vor kurzem aufgerufene Suchen

Getting 401 error when hitting search article endpoint.



Gepostet 05. März 2024

I started getting 401 error when I make a call to search the articles. I am using oauth token and sending that on the header 'Bearer'. This has worked previously and was able to get results and even tested paging and I see the results in the response. Now I get 401 unauthorized. I even tried regenerating the oauth token.

        $.ajax({
            url: "https://domain.zendesk.com/api/v2/help_center/articles/search.json?query=keyword",
            headers : {
                'Access-Control-Allow-Origin' : "*",
                'Authorization' : "Bearer " + oauth
            },
            data : {
                page : 1,
                per_page : 5,
                scropes: ["read"]
            },
            crossDomain: true,
            dataType: 'jsonp',
            cache: false,
            type: "GET",
            success: function(response) {
                
            },
            error: function(xhr) {
        
            
            }
        }); 


0

1

1 Kommentar

Either the `oauth` token got revoked or the user who authorized now has lower privileges which no longer allow the action. To check the status of OAuth tokens authorized by apps check out our free app App Authorizations.

0


Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.

Sie finden nicht, wonach Sie suchen?

Neuer Post