Top Menu

Jump to content
    Global modules

    Global modules

    • Home
    • Projects
    • Activity
    • Work packages
    • Gantt charts
    • Calendars
    • Team planners
    • Boards
    • News
    Home
    Home
Help
    Getting started
    • Introduction video
  • 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

User menu

Sign in
Forgot your password?

or sign in with your existing account

OpenProject ID Google

Side Menu

Collapse project menu

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

Content

Expand project menu
Development
  1. OpenProject Community
  2. OpenProject
  3. Forums
  4. Development
  5. conect API whit PHP

conect API whit PHP

Added by Jose Luis Esparza almost 8 years ago

i want to know how can conect with PHP this is my source
@
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(‘apikey’=>‘sajghdfjjagdhsfxxxxxxxx’));
curl_setopt($ch, CURLOPT_URL, ‘http://url/api/v3/projects/97/queries/default?pageSize=200&showHierarchies=true’);
$result = curl_exec($ch);@

but i can´t


Replies (1)

RE: conect API whit PHP - Added by Jose Luis Esparza almost 8 years ago

resolved this whit this line

@ curl_setopt($ch, CURLOPT_HTTPHEADER, array(“Authorization: Basic ”.base64_encode(‘apikey:895755dsghsXXXSsdXXXXXXX’)));@

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