Skip to content

Instantly share code, notes, and snippets.

@eojthebrave
Created May 9, 2014 14:42
Show Gist options
  • Save eojthebrave/05b105a1c7a95a019a42 to your computer and use it in GitHub Desktop.
Save eojthebrave/05b105a1c7a95a019a42 to your computer and use it in GitHub Desktop.
Drupal 7 services module session auth with cURL
`curl http://services-demo.lan/api/v1/user/login -d '{"name":"admin","pass":"admin"}' -H "Content-type: application/json" -H "Accept: application/json"`
`curl hhttp://services-demo.lan/api/v1/system/connect -X POST`
`curl http://services-demo.lan/api/v1/system/connect -H "Cookie: SESS60f8c5b86739b7e326223b4ef35867b2=A86XHGJWlnDcMOGcArbOT-qHrsIi5P2NrcoNTXwWluw" -H "X-CSRF-Token: T77haXwD7JKOJsBlKP3p3kLbjQO96bQWvGJAE1_PUZM" -X POST`
`curl http://services-demo.lan/api/v1/user/login -X POST -H "Content-type: application/json" -H "Accept: application/json"`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment