Last active
August 26, 2023 16:23
-
-
Save thanos/b2319a3267bd45a006f9b0e3fa437d7e to your computer and use it in GitHub Desktop.
setting up environmental variables for XENI Trade API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export XENI_API_HOST="https://xenitravelapi-beta01.gigalixirapp.com" | |
export XENI_USER_EMAIL="some@email.com" | |
export XENI_USER_PASSWORD="some password" | |
export XENI_TOKEN=$(curl -X 'POST' $XENI_API_HOST/api/accounts/get_token \ | |
-H 'accept: application/json' \ | |
-H 'content-type: application/json' \ | |
-d '{"user":{"email": "'"$XENI_USER_EMAIL"'", "password": "'"$XENI_USER_PASSWORD"'"}}' \ | |
| sed "s/{.*\"token\":\"\([^\"]*\).*}/\1/g") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment