在Guzzle工作卷曲的情况下获取访问令牌的方法是什么?

时间:2017-05-04 14:06:04

标签: curl guzzle

我有以下curl命令(工作):

curl https://[client_id]:[client_secret]@domain.tld/oauth/token \
    -X POST \
    -d "grant_type=client_credentials&scope=manage_my_profile:blah manage_settings:cool"

如何转换调用以获取access_token?

然后如何在guzzle客户端方法中调用以下内容?

$curl "https://domain.tld/products" \
       -H "Authorization: Bearer [my-access-token-retrieved-before]"

0 个答案:

没有答案
相关问题