Búsquedas recientes
No hay búsquedas recientes
Proxy error: UnprocessableEntity, Failed to get installation and oauth information for app
Publicado 20 ene 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
40
40 comentarios
Andrew Runciman
0
Greg Katechis
"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
Andrew Runciman
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
Andrew Runciman
Just as a follow up - this is a chunk of the minified code showing the placeholder being inserted.
0
Andrew Runciman
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
Christopher Kennedy
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
Andrew Runciman
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
Andrew Runciman
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
Parth Patel
I was able to authenticate upon initial load/install of the app but I don't have any way to see logs when it goes for refresh token.
This worked successfully 5 hours ago. and when i came back to it I am getting this error. so I am assuming the refresh token failed, the expires_in key is in the response from the token endpoint.
Please see link below
https://app.ninjarmm.com/apidocs-beta/authorization/flows/authorization-code-flow
ZAF client Support App Function:
async function getDevices() {
if (!token) {
console.log("Failed to obtain access token");
return;
}
try {
return await client.request({
url: "https://app.ninjarmm.com/api/v2/devices-detailed",
type: "GET",
headers: { Authorization: "Bearer {{setting.token}}" },
secure: true,
});
} catch (error) {
console.error("Error fetching devices:", error);
}
}
Manifest portion regarding oauth:
"parameters": [
{
"name": "token",
"type": "oauth"
}
],
"oauth": {
"response_type": "code",
"client_id": "************************",
"client_secret": "**********************************",
"authorize_uri": "https://app.ninjarmm.com/ws/oauth/authorize",
"scope": "control monitoring management",
"access_token_uri": "https://app.ninjarmm.com/ws/oauth/token"
},
0
Christopher Kennedy
Thanks for the info. In our logs I can see that our OAuth connection service fails to refresh because it did not receive a refresh token from NinjaOne on the initial authorization. To allow a refresh token to be returned, can you please include an
offline_access
scope in the app's manifest? NinjaOne's docs note that this scope is required for them to return a refresh token.Best,
Chris Kennedy | Developer Advocate
0