API booking/create redirect url asks user to log on

edited January 2014 in Developers
I collect all the information from the user, and I submit a booking using booking/create, and it returns a URL in request['url'] so I redirect the user to there, and they get a login prompt for Checkfront. Shouldn't they be able to check out without logging on?

Comments

  • edited January 2014
    Are you using tokens retrieved using a staff user (using oauth to connect then redirect back to authorize the code), or the tokens generated in the panel?  When using a staff login, the request url from a created booking returns the internal invoice location for staff to manage a booking (and will log the booking as being created by that staff member).  Basically, using a staff token should be considered roughly the equivalent of making a booking within the panel, where you don't immediately need to present a form directly to the customer.

    However, if the token you're using isn't associated with a specific staff member, it should consider it a web booking, and will provide the invoice url in that place.

    There's also a comment I made about building a payment URL on existing bookings with the current API version here.
  • I went into the API setup and generated a token. In my "new Checkfront(" call I have passed in consumer_key, consumer_secret, I've set "redirect_uri" to "oob", and passed in that generated refresh_token. (Actually, that token appears to have been expired and replaced with a different one in my database, so I'm using that one).
  • By the way, making a call to "mobile/booking/booking_id" got me the token, but I consider that a work-around since it involves a second round trip over the network and since the "mobile" api doesn't appear to be documented. I'd much rather have a way to make the booking and get back the usable client url all in one.
  • Hmm, yeah, looks like for the moment the tokens you're getting are being tied to the logged in staff account.  There is a static token you can use in the upcoming 3.0 update that should allow you to set up this sort of server-to-server application quicker for web bookings, but in the mean time the work-around will at least get it done.

  • Thanks, Kris. Looking forward to seeing the docs for the 3.0 update.

This discussion has been closed.