Turning cURL request into PHP

Soldato
Joined
26 Aug 2012
Posts
4,399
Location
North West
How would I turn the below cURL request into PHP? I can see the last bit is the parameter URL and there are some headers in there, but not sure how to convert.

PHP:
curl -v -X GET \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: SSWS ${api_token}" \
"https://${org}.okta.com/api/v1/users/me"
 
Back
Top Bottom