Can not create translation using API - 403 response but rights are sufficient
Hello,
I am troubleshooting our integration with Zendesk for one of our clients.
I have read the documentation: https://developer.zendesk.com/api-reference/help_center/help-center-api/translations/#create-translation
I can not access the Zendesk instance itself, I can only validate information using API.
Please allow me to share the investigation results:
All of the API Calls were tested using postman with the proper email-token combination for this user.
GET https://{subdomain}.zendesk.com/api/v2/users/me.jsonresponse 200 OK (modified):"email": "some-client@mail.com", "role": "admin", "verified": true, "ticket_restriction": null,Looks like this account has sufficient rights to properly send the translated content.GET https://{subdmain}.zendesk.com/api/v2/help_center/articles/360017900680/translations/missing.jsonresponse 200 OK:{"locales": ["de-de", "es-419"] }The email and token combination can extract the missing translations of the article. This proves that the translations were in fact not sent.POST https://{subdomain}.zendesk.com/api/v2/help_center/articles/360017900680/translations.jsonrequest body raw-JSON: { "translation": { "locale": "de-de", "title": "connection-test-de-de", "body": "Test, please ignore" } }response 403 Forbidden - no response body
Allowed for
- Help Center Managers
- Agents (article translations only)
The requesting agent can create an article translation only if they can edit the article in Help Center.
Our client stated that the article in question can be accessed and edited with this account. I would greatly appreciate any advice
Kind regards,
Adam
-
Hey, Adam!
A 403 response would indicate that the account does not have the required permissions to alter the article in question. I'd suggest having your client have a read through this article to ensure their permissions have been set correctly, and trying the API request again once the necessary changes have been made.
Understanding Guide user permissions for knowledge base access
I hope this helps! Feel free to reach out if you run in to any further issues.
Tipene
-
Hi Tipene,
Thank you for the feedback I will forward your response to the client.
However, can you please help me to understand why the response body is empty in this case?
Some time ago I was using the same API Calls as troubleshooting steps to investigate a similar issue for another client of ours. The response was also 403 but the body returned was:
{
"error": {
"title": "Forbidden",
"message": "You do not have access to this page. Please contact the account owner of this help desk for further help."
}
}But once again I see no response now.
Thanks,
Adam
-
Hey Adam,
I agree that it is frustrating to not have a descriptive message returned in the response body. I'll pass this on to the team that owns this API to look in to having the response updated with more context in the case of a 403 error.
Thanks!
Tipene
-
Hell Tipene,
Thank you for the continued support, our client states that he can access the article in question as well as edit it. The account has no restrictions to any of the tickets.
I am looking forward to the additional information.
Thanks,
Adam
-
Hi Adam,
That's strange. I'm going to pull this in to ticket so we can take a look in a bit more detail. You should see an email come through from the shortly!
-
Hello Adam,
What brand are you trying to use? I face the same issue with 403 and 401 with Guide API for the non-main brand(where the instance subdomain isn't the same as the help centre subdomain).
For example, if your app is on https://instance.zendesk.com, then API calls with be ok for https://instance.zendesk.com/api/v2/help_center and fail for https://instance-uk.zendesk.comapi/v2/help_center(some of them are still ok).
I also need a solution here, because it seems like a Guide API bug and we can't do much. I was able to fix this issue via oAuth tokens, but only for admin users.
Thanks,
Andriy -
Hey Dev account,
Thanks for reaching out!
Are you still experiencing the issue you mentioned above? If so, one area I'd suggest checking first is content blocks. There are certain scenarios that will cause you to receive a 403 when content blocks have been enabled in your help center. This article goes in to more detail:
https://developer.zendesk.com/documentation/help_center/help-center-api/using-the-help-center-api/content-blocks-limitations/If you continue to run in to issues, please let me know and we can look in to it in more detail.
Thanks!
Tipene
-
Hello Tipene,
Sorry for the long reply, and thanks for your advice. There is no issue with content blocks because they were disabled in my instance. I think the problem with Guide API when requesting from the Zendesk app. In this case, we can't use API tokens to authenticate requests, so Guide API fails for brands with different URLs.
Any help will be appreciated because I can't prepare the app for the marketplace because of this problem.
Thanks,
Andriy -
Hi Andriy,
This is actually expected behavior because we only implement CORS for API requests authenticated via OAuth. As an alternative, you may create a server-side app that runs in the app iframe. This would allow you to successfully send requests to multiple domains.
-
Hello Christopher,
Thanks a lot for the explanation. I'll consider a server-side option for this app.
Best regards,
Andriy
Por favor, entrar para comentar.
10 Comentários