Correct way to set Bearer token with CURL

前端 未结 7 891
悲哀的现实
悲哀的现实 2020-11-30 22:12

I get my bearer token from an API end point and set the following:

$authorization = \"Bearer 080042cad6356ad5dc0a720c18b53b8e53d4c274\"

Nex

7条回答
  •  广开言路
    2020-11-30 22:48

    Replace:

    $authorization = "Bearer 080042cad6356ad5dc0a720c18b53b8e53d4c274"
    

    with:

    $authorization = "Authorization: Bearer 080042cad6356ad5dc0a720c18b53b8e53d4c274";
    

    to make it a valid and working Authorization header.

提交回复
热议问题