Top Menu

Jump to content
Home
    Modules
      • Projects
      • Activity
      • Work packages
      • Gantt charts
      • Calendars
      • Team planners
      • Boards
      • News
    • Getting started
    • Introduction video
      Welcome to OpenProject Community
      Get a quick overview of project management and team collaboration with OpenProject. You can restart this video from the help menu.

    • Help and support
    • Upgrade to Enterprise edition
    • User guides
    • Videos
    • Shortcuts
    • Community forum
    • Enterprise support

    • Additional resources
    • Data privacy and security policy
    • Digital accessibility (DE)
    • OpenProject website
    • Security alerts / Newsletter
    • OpenProject blog
    • Release notes
    • Report a bug
    • Development roadmap
    • Add and edit translations
    • API documentation
  • Sign in
      Forgot your password?

      or sign in with your existing account

      Google

Side Menu

  • Overview
  • Activity
    Activity
  • Roadmap
  • Work packages
    Work packages
  • Gantt charts
    Gantt charts
  • Calendars
    Calendars
  • Team planners
    Team planners
  • Boards
    Boards
  • News
  • Forums

Content

Development
  1. OpenProject
  2. Forums
  3. Development
  4. API always return "You need to be authenticated to access this resource."

API always return "You need to be authenticated to access this resource."

Added by Jérémy Pinto almost 10 years ago

Hello,

I try to use the API V3 to call this ressource “https://community.openproject.com/api/v3/users/39083” but it always give me the same response :
errorIdentifier need to be authenticated to access this resource."

I do it with curl :
curl -u apikey:$APIKEY https://community.openproject.com/api/v3/users/39083

Either in my terminal or in my website with php, I get this error message.

Did I miss something ?


Replies (4)

RE: API always return "You need to be authenticated to access this resource." - Added by Jan Sandbrink almost 10 years ago

Two problems:

1. it is community.openproject.org
2. basic auth is only working from OpenProject 4.2 upwards, not on OpenProject 4.1

The latter one is an issue of proper documentation on our side. The right documentation for your version of OpenProject can be found within your installation directory under doc.

There are some slight differences between the documentation and the implementation, but I hope that we will eventually remove these…

RE: API always return "You need to be authenticated to access this resource." - Added by Jérémy Pinto almost 10 years ago

I am using the 4.1.1 version, I will update my OpenProject and try.

Thanks for this rapid answer.

RE: API always return "You need to be authenticated to access this resource." - Added by Jérémy Pinto almost 10 years ago

I have just seen 4.2 is not a release ?

Does it mean the api V3 doesn’t work with official releases?

RE: API always return "You need to be authenticated to access this resource." - Added by Jan Sandbrink almost 10 years ago

Basic auth authentication will just be a new thing with 4.2, which is not yet released.

Up until 4.1 the only way of authentication is cookie based, that means: When your browser is logged in, your browser can make requests (that is what the angular client does). External clients are officially supported starting with OP 4.2.

One last word of warning: The reason why we titled the APIv3 specification as a “draft” is that we do not want to call it stable yet. One thing is that many important endpoints are simply not there yet (e.g. list work packages), the other point is that we might find that a decision about an existing endpoint was not as clever as we thought and we will change that existing endpoint again (I am currently doing such things to the attachments endpoint and the watchers endpoints).

In the end this should lead to a consistent API that everyone will enjoy. While we are on the way it surely means, that the API will change and evolve.

That being said I’d love people make use of the API already, just don’t be disapointed when things change :)

Best regards
Jan Sandbrink

  • (1 - 4/4)
Loading...