0

Example Authorization with Postman Authorization:

oauth_token="AQDSADSAAA****************", 
oauth_client_id="5c9ASDASD********"

The same thing I need to repeat in curl in php, how can I do it?

Andrea Olivato
  • 2,450
  • 1
  • 18
  • 30
  • Does this answer your question? [Using PHP cURL to POST data on /oauth2/access\_token and GET data as jSON](https://stackoverflow.com/questions/31416209/using-php-curl-to-post-data-on-oauth2-access-token-and-get-data-as-json) – Andrea Olivato Apr 09 '22 at 14:35
  • It really depends on the API. They can either be passed in post or headers. If it's in post, you can check the above answer. – Andrea Olivato Apr 09 '22 at 14:35
  • No, i using get request –  Apr 09 '22 at 14:35
  • I want use in headers –  Apr 09 '22 at 14:37
  • Then use `CURLOPT_HTTPHEADER`, depending on your API : https://stackoverflow.com/questions/30426047/correct-way-to-set-bearer-token-with-curl – Andrea Olivato Apr 09 '22 at 14:39
  • Your "example" isn't really an example of anything - are these just variables that you're using in your Postman request somewhere? *Where* are you putting them? Note also that [Postman can generate PHP code for your request](https://learning.postman.com/docs/sending-requests/generate-code-snippets/) – IMSoP Apr 09 '22 at 14:57

0 Answers0