Skip to content

Commit c4650fc

Browse files
committed
add token example with curl
1 parent a415e2e commit c4650fc

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,16 @@ What if you want to use our API for a production service that cannot depend on t
144144

145145
#### Authorization token for Plus service
146146

147-
When you sign up for the Plus service, you will be issued an API token that you should put in the `Authorization` header of all your rest API requests. This token will ensure that said requests get directed to a pool of machines that are reserved for "Plus" SLA users.
147+
When you sign up for the Plus service, you will be issued an API token that you should put in the `Authorization` header of all your rest API requests. This token will ensure that said requests get directed to a pool of machines that are reserved for "Plus" SLA users. For example, with [curl](https://curl.haxx.se/):
148+
149+
```
150+
curl -X GET \
151+
https://api.crossref.org/works \
152+
-H 'Authorization: Bearer yJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vY3Jvc3NyZWYub3JnLyIsImF1ZXYZImVuaGFuY2VkY21zIiwianRpIjoiN0M5ODlFNTItMTFEQS00QkY3LUJCRUUtODFCMUM3QzE0OTZEIn0.NYe3-O066sce9R1fjMzNEvP88VqSEaYdBY622FDiG8Uq' \
153+
-H 'User-Agent: GroovyBib/1.1 (https://example.org/GroovyBib/; mailto:[email protected]) BasedOnFunkyLib/1.4'
154+
```
155+
156+
Note that you can still be "polite" and identify yourself as well. And, of course, replace the fake token above with the real token.
148157

149158
## API overview
150159

@@ -737,4 +746,5 @@ Each major version has no backwards incompatible changes within its public inter
737746
- v57, 2018-02-01, document ISBN filter
738747
- v58, 2018-02-13, document `reference-visibility` filter for `/works` and `/members` routes
739748
- v59, 2018-02-13, added info about Mtedata Plus service. Corrected spelling. Added example of using `reference-visibility` filter.
740-
- v60, 2018-02-22, added info for "Plus" users on use of toekn in `Authorization` header.
749+
- v60, 2018-02-22, added info for "Plus" users on use of token in `Authorization` header.
750+
- v61, 2018-02-26, add curl example for use of token.

0 commit comments

Comments
 (0)