Skip to content

Replace 'Request access' with actual POST to Zendesk #58

@brechtvdv

Description

@brechtvdv

Requesting a service happens now by redirecting to https://viaa.zendesk.com/hc/nl/requests/new.

We want to replace this by sending a JSON object to the zendesk API automatically, because we already have all the info that needs to be send: their email adress, (name), organization and the service they want to have access to.

Two things need to be changed:

  • Send a POST request to the Zendesk API.
    You can do this in the command line like this (but you need to do this in the front-end with an ajax call:
curl https://viaa.zendesk.com/api/v2/tickets.json -d '{"ticket": {"subject": "Toegang tot dienst {naam-dienst}", "comment": { "body": "Email-adres: {email-adress}\n Naam: {naam-persoon}\n Organisatie: {organisatie}\n"}, "tags": ["toegang-dienst"] }}' -H "Content-Type: application/json" -v -u {username}:{password} -X POST

I will send you the credentials of the 'support' account.

  • Change the layout so 'Request access' changes to 'Access requested'

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions