Search code examples
angularjsangularjs-httppivotaltracker

Angularjs http basic auth with username and password for Pivotal Tracker api


I'm trying to develop an application to get the Pivotal Tracker stories. First of all I need to do basic authentication to get my Pivotal Tracker token.

Using PHP cURL, I'm doing like this,

curl -X GET --user vader:bad_word "https://www.pivotaltracker.com/services/v5/me"

I want this to be done with Angular. I have tried,

$http.defaults.headers.common['Authorization'] = 'Basic ' + login + ':' + password);

but it shows,

Request header field Authorization is not allowed by Access-Control-Allow-Headers.

any suggestions to get done?

Thanks in advance. :)


Solution

  • Pivotal Tracker have not yet support client side username and password validation method. Currently they are supporting only X-Token method from client side. If we want to do this, we have to use server side scripting only.

    check here : validation can only be done with token and not with "username/password"

    and generating the token should done in server side.

    Each individual Pivotal Tracker login may be associated with a unique API Token value, which serves as a single-factor authentication for API requests. API tokens are allocated and copied from an individual's Profile page after logging into Tracker.