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



Publication le 20 janv. 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

48

48 commentaire

Hi Andy! My first guess would be an issue with the refresh if it's missing certain values on the initial token response. Take a look at this note and let me know if either of those are missing.

0


Hi - Is there a solution for the Proxy error: UnprocessableEntity, Failed to get installation and oauth information for app.  I have an app that when installed, works initially but then returns this error. If I reinstall the app it works again.  The app is authenticated correctly via Oauth in the App settings.  I have "parameters": [{"name": "token","type": “oauth”}] set in the manifest and the correct OAuth block.  Within my request I am using Authorization:"Bearer {{setting.token}}" as per the docs. I am wondering if it occurs once the authorisation token has expired and isn't being refreshed. I am using Auth0 as the OAuth provider.

0


Hi Rocky! It's difficult to say exactly what problems you may be experiencing based on the code that you shared. I initially thought it may be due to the secure settings that you're using, but I don't think that's the case. Are you able to successfully send this to your service or even something like pastebin from a tool like Postman? It will help narrow down whether the issue is with the code or with the apps framework. Please share any other troubleshooting that you've done.

0


hello @Tipene Hughes sir 

const file = new File([blobData], mediaData.fileName, {
type: blobData.type,
});
const formData = new FormData();
formData.append("media", file);
formData.append("title", file.name);
formData.append("content_type", file.type);
formData.append("account", spokiAccount?.id);
const metadata = await client.metadata();

 
const sendMedia = await client.request({
url: `${BASE_URL}/media/`,
type: "POST",
dataType: "json",
data: formData,
headers: {
"Content-Type": "multipart/form-data",
X-secret:
typeof metadata.installationId === "string"
? spokiAccessKey
: "{{setting.spokiAccessKey}}",
},
secure: !(typeof metadata.installationId === "string"),
});


"hello 1264158211509 sir When I pass FormData as the payload in my API call, the media file is not included in the payload when I check the request in the browser's network tab. Why is this happening, and how can I fix it? Also, can you confirm if my code is correct?"
 

 

0


Thanks for the update. I'm going to pull this in to a private ticket so I can grab a few more details. You should see an email coming through from me shortly!

0


Hi Tipene, uploaded to zendesk apps. I dont think i can run secure credentials locally. 

0


Hey Parth,
 
Are you running this locally or is the app uploaded to your Zendesk instance?

0


Eric, Will, did you guys ever find a solution to this? I am attempting the exact same thing and getting this issue. 

manifest.json

 "location": {
    "support": {
      "nav_bar": "assets/iframe.html"
    }
  },
  "parameters": [
    {
      "name": "access_token",
      "type": "oauth"
    }
  ],
  "oauth": {
    "client_id": "*********************************",
    "client_secret": "**********************************",
    "access_token_uri": "https://app.ninjarmm.com/oauth/token",
    "scopes": [
      "control monitoring management"
    ]
  },

bottom of iframe.html
  <script>
    // Initialise Apps framework client. See also:
    var client = ZAFClient.init();
    client.invoke('resize', { width: '100%', height: '200px' });
    async function getDevices() {
      const options = {
        type: "GET",
        headers: {
          Authorization: "Bearer {{setting.access_token}}",
        },
        secure: true,
      };
      await client.request(options).then((response) => {
        console.log(response.json());
      });
    }
    getDevices()
  </script>
 

0


Hey Will,

You mind if we pull this into a ticket so that you can share a zip of your app for us to take a look at?

Thanks!

0


If I set that I get

Uploading app... Uploaded
Deploying app... Failed
 ›   Error: Error: oauth parameter cannot be set to be secure.

0


Vous connecter pour laisser un commentaire.

Vous ne trouvez pas ce que vous cherchez ?

Nouvelle publication