Skip to content

Instantly share code, notes, and snippets.

@okmit
Last active November 23, 2019 09:13
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 okmit/37cdee7b392fe5b0fb3031d1bea1bf5a to your computer and use it in GitHub Desktop.
Save okmit/37cdee7b392fe5b0fb3031d1bea1bf5a to your computer and use it in GitHub Desktop.

Driver Authentication (STEP 1)

  • URL

    /v1/drivers/sessions

  • Method:

    POST

  • Data Params

    driver[phone_number]=[text]

  • Success Response:

    • Code: 201 CREATED
      Content: { message: 'SMS with auth code sent' }
  • Error Response:

    • Code: 404 NOT FOUND
      Content: { error: 'Driver with a provided phone number not found' }
  • Sample Call:

  • Notes:

Driver Authentication (STEP 2)

  • URL

    /v1/drivers/sessions

  • Method:

    PUT | PATCH

  • Data Params

    driver[auth_token]=[text]

  • Success Response:

    • Code: 201 CREATED
      Content: {"data":{"employee":{"email":"driver.bill@dvl.vom"},"token":"ACCSESS_TOKEN"}}
  • Error Response:

    • Code: 401 UNAUTHORIZED
      Content: { error: 'invalid auth code' }
  • Sample Call:

  • Notes:

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