Correct way to set Bearer token with CURL

前端 未结 7 860
悲哀的现实
悲哀的现实 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 23:03

    If you are working with a private token instead (like Gitlab API), you should replace:

    $authorization = "Authorization: Bearer 080042cad6356ad5dc0a720c18b53b8e53d4c274"

    with:

    $authorization = "PRIVATE-TOKEN 080042cad6356ad5dc0a720c18b53b8e53d4c274";

    0 讨论(0)
提交回复
热议问题