Skip to content

Instantly share code, notes, and snippets.

@melevittfl
Last active July 31, 2021 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melevittfl/132d40b78dcd393749bc5be5a4d48fb9 to your computer and use it in GitHub Desktop.
Save melevittfl/132d40b78dcd393749bc5be5a4d48fb9 to your computer and use it in GitHub Desktop.
Example request/response to Lightwave
curl -X POST \
https://auth.lightwaverf.com/v2/lightwaverf/autouserlogin/lwapps \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-H 'x-lwrf-appid: ios-01' \
-d '{
"email": "email",
"password": "password",
"version": "2.0"
}'
Response:
{
"user": {
"givenName": "Chris",
"familyName": "Knight",
"email": "chris@pacifictech.edu",
"lightwaveRfPublic": {
"country": "United States",
"myClient": {
"bearer": "kjf",
"refresh_token": "lksdf"
}
},
"providers": {},
"_id": "sdf",
"created": 29232,
"modified": 232424
},
"tokens": {
"access_token": "ey...",
"token_type": "Bearer",
"expires_in": 604800,
"refresh_token": "dfs...",
"id_token": "ey..."
}
}
@melevittfl
Copy link
Author

melevittfl commented Jul 30, 2021

Thank you very much for your providing the useful codes. Could I ask whether you can also provide me the codes that can be used to generate the refresh token? Thank you very much.

It would be something like:

    curl --include \
         --request POST \
         --header "authorization: basic TOKEN" \
         --header "content-type: application/json" \
         --data-binary "{
        \"grant_type\": \"refresh_token\",
        \"refresh_token\": \"REFRESH_TOKEN\"
    }" \
    'https://auth.lightwaverf.com/token'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment