tripit / api

TripIt's API Documentation and Support Forum
http://www.tripit.com/developer
Other
47 stars 16 forks source link

invalid credentials, unconfirmed email address, or basic web auth not active for this account #167

Closed amerpersonal closed 7 years ago

amerpersonal commented 8 years ago

Hi,

I signed up of tripit using gmail account. Now I'm trying do do API call using basic auth from postman and it shows me 401 response with message:

invalid credentials, unconfirmed email address, or basic web auth not active for this account

I chose Basic auth in postman and entered my email and password and clicked Update request. What am I doing wrong?

Thanks,

Amer

aksharachaturvedi commented 8 years ago

Hi @amerpersonal ,

Once you have registered the email address you need to confirm the signup, TripIt sends confirmation email to the registered email and you need to confirm.

If you have already done confirmation, then you need to have Basic WebAuth turned on for your account, then you do not need to perform any OAuth authorization. You could directly make API calls using a base-64 encoded string that represents your username and password like this:

Base-64-encode(your_email@gmail.com:your_password)

Once you have this base-64-string, you could make an API call this this: curl -X GET -H "Authorization: Basic <base-64-string>" "Content-Type: application/x-www-form-urlencoded" -d '' "https://api.tripit.com/v1/list/trip"

You can find more info in the Web Authentication section of our API documentation here: http://tripit.github.io/api/doc/v1/index.html

Hope this helps.

Thanks, Akshara