422 Unprocessable Entity when using request proxy



Publicado 13 jun 2023

Hello,

I am following the guidelines provided at https://developer.zendesk.com/documentation/apps/app-developer-guide/making-api-requests-from-a-zendesk-app/#using-a-third-party-oauth-access-token and every time i try to perform a request using the proxy i get a HTTP 422 Unprocessable Entity error.

My App has successfully completed the OAuth setup (i use Okta as the OAuth provider)  and i am trying to make a simple call to my backend.

const options = {
url: "https://api.example.com/list",
type: "GET",
headers: {
  Authorization: "Bearer {{setting.token}}",
},
secure: true,
};
await this._client.request(options);

 


0

5

5 comentarios

1263082154109 any news regarding this one?

0


Hmm.. the target is a fake URL .. in theory it should return a network error instead of an expired token. 
Does the proxy check the JWT itself before making the call to the target endpoint? Another question is shouldn't the proxy refresh the token if applicable (Okta returns all the required fields during the OAuth setup)

0


Thanks for that! From what I can see, it's saying that the token has expired. Can you confirm that if you generate the token manually and make a manual call with a Bearer auth header that it does not work either?

0


Hi Greg!

I am using our sandbox environment with subdomain yapecrm1673879820. The app itself is a simple sidebar application with one button that triggers the above mentioned call

0


Hi Luis! There are many possible reasons that you could be getting a 422 in this scenario, so it's hard to say from this code snippet. What Zendesk subdomain are you making this request from? I might be able to find something in our logs to provides some additional details.

 

0


Iniciar sesión para dejar un comentario.

¿No encontró lo que buscaba?

Nueva publicación