Recent searches


No recent searches

Proxy error: UnprocessableEntity, Failed to get installation and oauth information for app



Posted Jan 20, 2022

I have been guided here by Zendesk support, I am receiving the error Proxy error: {:code=>"UnprocessableEntity", :status=>"422", :title=>"Unprocessable Entity", :message=>"Failed to get installation and oauth information for app."} when I attempt to create a request to a 3rd party server, I have followed your extensive guide but still recieving the above.


2

38

38 comments

{
  "_warning": "AUTOMATICALLY GENERATED FROM $/src/manifest.json - DO NOT MODIFY THIS FILE DIRECTLY",
  "name": "...",
  "author": {
    "name": "...",
    "email": "...",
    "url": "..."
  },
  "defaultLocale": "en",
  "private": true,
  "location": {
    "support": {
      "ticket_sidebar": {
        "url": "assets/index.html",
        "flexible": true
      }
    }
  },
  "parameters": [
    {
      "name": "token",
      "type": "oauth"
    }
  ],
  "oauth": {
    "client_id": "0...K",
    "client_secret": "r...f",
    "authorize_uri": "https:....eu.auth0.com/oauth/authorize",
    "access_token_uri": "https:....eu.auth0.com/oauth/token",
    "scope": "openid profile email",
    "secure": "true"
  },
  "version": "1.0",
  "frameworkVersion": "2.0"
}

 const fetchData = async () => {
    try {
      setLoading(true);
      const data = await client.request(buildRequest(url));
      setData(data);
      setError(null);
    } catch (error) {
      setError(error);
    } finally {
      setLoading(false);
    }
  }
  
  const buildRequest = (url) => ({
  url: `${import.meta.env.VITE_API_URL}/api/${url}`,
  type: "GET",
  headers: {
    Authorization: `Bearer ${import.meta.env.VITE_JWT_TOKEN}`,
  },
  contentType: "application/json",
  secure: import.meta.env.VITE_SECURE_OAUTH === 'true',
});

0


image avatar

Greg Katechis

Zendesk Developer Advocacy

Thanks for that Andy! I'm not seeing where you're using the OAuth token in this request...the Auth headers are referencing a JWT, not the OAuth token that you defined. So I think the issue here is that your JWT is expiring and the OAuth token is never being used. Could you update the request to use "Bearer {{setting.token}}" instead? 
 
Also, not sure if this will matter, but I don't believe you need to specify the oauth object as secure itself, you just need to set that in the request. Let me know if this resolves it all for you.

0


Hi, I will remove the secure prop - to support local dev the ${import.meta.env.VITE_JWT_TOKEN} is compiled to Bearer {{setting.token}} when in prod and is substituted with an actual token locally.  As I say, the app works fine the first time it is installed (so the token is correctly substituted for at least some of the time).

0


Just as a follow up - this is a chunk of the minified code showing the placeholder being inserted.

{Authorization:"Bearer {{setting.token}}"},contentType:"application/json",secure:!0}),g=(s,t)=>{const[a,r]=x.useState(!0),[l,c]=x.useState(null),[n,i]=x.useState(null);x.useEffect(()=>{d()},[s]);const d=async()=>{try{r(!0);const o=await t.request(v(s));i(o),c(null)}catch(o){o.status===401?c("Please ask a Zendesk administrator to re-authenticate with Auth0"):

0


I have tried setting the secure property to false within the Oauth property - as expected this fails with invalid token as the substitution is not made.

0


image avatar

Christopher Kennedy

Zendesk Developer Advocacy

Hi Andy,
 
I'm Chris from our Developer Support team, stepping in to assist while Greg is unavailable.  I took a look at the details you shared and as a next step I'd like to review some logging of a request attempt.  To help with this, can you reproduce the proxy error again and let me know the timestamp of the attempt?
 
Best,
 
Chris Kennedy | Developer Advocate

0


Hi - I have successfully authenticated using the bearer token at 2025-03-24T11:12:00, I will wait until the token expires and let you know the timestamp when I get the failure message. Kind regards Andy

0


Hi, at 2025-03-24T15:54:22 the API returned Proxy error: {:code=>"UnprocessableEntity", :status=>"422", :title=>"Unprocessable Entity", :message=>"Failed to get installation and oauth information for app."} when hitting https://problemsharedengineeringhelp.zendesk.com/proxy/v2/apps/secure
 

0


Please sign in to leave a comment.

Didn't find what you're looking for?

New post