Header name typo
parent
0987f5d1eb
commit
0156ead85f
|
@ -67,7 +67,7 @@ curl -XPOST -H 'Content-Type: application/json' -d '
|
|||
' http://localhost:8008/auth
|
||||
```
|
||||
|
||||
You can then store this token in an environment variable (e.g. `$PP_TOKEN`) and include it in your API calls over the `Authentication: Bearer` header.
|
||||
You can then store this token in an environment variable (e.g. `$PP_TOKEN`) and include it in your API calls over the `Authorization: Bearer` header.
|
||||
|
||||
Note: if you have authentication issues with the Hue bridge, press the physical connect button on the bridge and restart the application.
|
||||
|
||||
|
@ -76,7 +76,7 @@ Note: if you have authentication issues with the Hue bridge, press the physical
|
|||
```shell
|
||||
curl -XPOST \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H "Authentication: Bearer $PP_TOKEN" \
|
||||
-H "Authorization: Bearer $PP_TOKEN" \
|
||||
-d '{"type":"request", "action":"light.hue.on"}' \
|
||||
http://localhost:8008/execute
|
||||
```
|
||||
|
@ -115,7 +115,7 @@ If configured, the calls to the service will require this bearer token to be pro
|
|||
- As a query string parameter (`?token=your_authentication_token`)
|
||||
- As an HTTP header (`X-Token: your_authentication_token`)
|
||||
- At the root of your JSON request (attribute name: `token`)
|
||||
- On the `Authentication: Bearer` HTTP header.
|
||||
- On the `Authorization: Bearer` HTTP header.
|
||||
|
||||
The web interface will also require basic HTTP authentication through this token.
|
||||
|
||||
|
@ -127,7 +127,7 @@ Note that if you configured a token you'll be promped with a basic HTTP authenti
|
|||
|
||||
```shell
|
||||
curl -XPOST -H 'Content-Type: application/json' \
|
||||
-H "Authentication: Bearer $PP_TOKEN" \
|
||||
-H "Authorization: Bearer $PP_TOKEN" \
|
||||
-d '{"type":"request", "target":"your_device_id", "action":"light.hue.on", "args": {"groups":["Bedroom"]}}' \
|
||||
http://localhost:8008/execute
|
||||
```
|
||||
|
@ -214,7 +214,7 @@ Restart Platypush and test out the plugin with a curl call:
|
|||
|
||||
```shell
|
||||
curl -XPOST -H 'Content-Type: application/json' \
|
||||
-H "Authentication: Bearer $PP_TOKEN" \
|
||||
-H "Authorization: Bearer $PP_TOKEN" \
|
||||
-d '{"type":"request", "target":"your_device_id", "action":"weather.forecast.get_current_weather"}' \
|
||||
http://localhost:8008/execute
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue