Skip to content

Instantly share code, notes, and snippets.

@akirilyuk
Last active April 13, 2021 15:22
Show Gist options
  • Select an option

  • Save akirilyuk/89862072da9c7144724632c9208f8b86 to your computer and use it in GitHub Desktop.

Select an option

Save akirilyuk/89862072da9c7144724632c9208f8b86 to your computer and use it in GitHub Desktop.
ACCOUNTID='ACCOUNTID' && USERNAME='ADMIN_USERNAME' && PASSWORD='PASSWORD' && \
DOMAIN=$(curl --location --request GET "http://api.liveperson.net/api/account/$ACCOUNTID/service/agentVep/baseURI.json?version=1.0" \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' | jq -r '.baseURI') \
&& AGENTVEPLOGIN="https://$DOMAIN/api/account/$ACCOUNTID/login?v=1.3" \
&& BEARER=$(curl --location --request POST "https://$DOMAIN/api/account/$ACCOUNTID/login?v=1.3" \
--header 'Content-Type: application/json' \ --header 'Accept: application/json' \
--data-raw "{\"username\":\"$USERNAME\", \"password\":\"$PASSWORD\"}" | jq -r '.bearer') && echo $BEARER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment