最近の検索


最近の検索はありません

Chinh Phan's Avatar

Chinh Phan

参加日2021年5月13日

·

前回のアクティビティ2021年10月25日

フォロー中

0

フォロワー

0

合計アクティビティ

9

投票

0

受信登録

3

アクティビティの概要

さんの最近のアクティビティ Chinh Phan

Chinh Phanさんがコメントを作成しました:

コメントSecurity and user access in Zendesk Support

Hi Cheeny Aban,

I'm implement the contact form from Frontend via Javascript, submit Ticket to Zendesk. Look like this: 

When I try to POST a ticket to zendesk, I'm facing the CORs issue (I used all tokens, aouth in zendesk setting).

Ticket's API requires the authorization is "Bearer " + access_token.

I thought the API get access_token work when I tested via Postman: https://{subdomain}.zendesk.com/api/v2/oauth/tokens
But no, when I apply API get access token to javascript code. I'm also facing the CORs issue.

If I implement as in the document at: https://support.zendesk.com/hc/en-us/articles/203663836?page=3#topic_ar1_mfs_qk

when browser redirect to the url: https://{subdomain}.zendesk.com/oauth/authorizations/new?response_type=code&redirect_uri={your_redirect_url}&client_id={your_unique_identifier}&scope=read%20write

It forces I have to login into zendesk. It is not feasible for users who do not have an account.

コメントを表示 · 投稿日時:2021年9月17日 · Chinh Phan

0

フォロワー

1

投票

0

コメント


Chinh Phanさんがコメントを作成しました:

コメントSecurity and user access in Zendesk Support

Hi,

How can I get the full access token within just one API? I'm using javascript to call, and implement a ticket form from my website.

 

コメントを表示 · 投稿日時:2021年9月13日 · Chinh Phan

0

フォロワー

1

投票

0

コメント


Chinh Phanさんがコメントを作成しました:

コミュニティのコメント Developer - Zendesk APIs

It seems there is just only way to create a ticket form and implement from Frontend via Javascript is:
Get token access, on document: https://developer.zendesk.com/documentation/ticketing/using-the-zendesk-api/making-cross-origin-browser-side-api-requests/

in function:

function init() {
// reset page
document.getElementById('error-msg').style.display="none";
document.getElementById('details').style.display="none";

varurl=window.location.href;
if (url.indexOf('http://localhost:8080/contact.html') !==-1) {
if (url.indexOf('access_token=') !==-1) {
varaccess_token=readUrlParam(url, 'access_token');
localStorage.setItem('zauth', access_token);
varticket_id=localStorage.getItem('ticket_id');
document.getElementById('ticket-id').value =ticket_id;
window.location.hash="";
makeRequest(access_token, ticket_id);
}

if (url.indexOf('error=') !==-1) {
varerror_desc=readUrlParam(url, 'error_description');
varmsg='Authorization error:'+error_desc;
showError(msg);
}
}
}
 
function startAuthFlow() {
var endpoint = 'https://***.com/oauth/authorizations/new';
var url_params = '?' +
'response_type=token' + '&' +
'redirect_uri=http://localhost:8080/contact.html' + '&' +
'client_id=dfodevtest' + '&' +
'scope=' + encodeURIComponent('read write');
window.location = endpoint + url_params;
}

After that, we have access token in localstorage, named: zauth, example define variable is: zauthValue

Then when we create a POST request, the Authorization should be: Bearer + zauthValue

But this way will redirect user to the authorizations/new... page.

コメントを表示 · 投稿日時:2021年9月13日 · Chinh Phan

0

フォロワー

0

投票

0

コメント


Chinh Phanさんがコメントを作成しました:

コメントHow to manage the widget for live chat

Awesome, It hided.

Many thanks

コメントを表示 · 投稿日時:2021年3月09日 · Chinh Phan

0

フォロワー

0

投票

0

コメント


Chinh Phanさんがコメントを作成しました:

コメントHow to manage the widget for live chat

I tried.

The button is not say "Chat" any more. It says "Help"

コメントを表示 · 投稿日時:2021年3月09日 · Chinh Phan

0

フォロワー

0

投票

0

コメント


Chinh Phanさんがコメントを作成しました:

コメントHow to manage the widget for live chat

Hi,

I read both these urls: 
https://support.zendesk.com/hc/en-us/articles/115010352968
https://support.zendesk.com/hc/en-us/articles/360022184994?page=1#comment_360004897033

But it's still not work on my end.

Code:
var _urlConfig = {
'en-us': {
departments: {
enabled: ['']
},
locale: 'en-us'
},
'__default': {
  departments: {
enabled: ['']
},
locale: 'en-us'
};

I also try to update enabled: ['']  to  enabled: [] or remove enable field. But it's not work at all.

コメントを表示 · 投稿日時:2021年3月09日 · Chinh Phan

0

フォロワー

0

投票

0

コメント