X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=src%2FWallabag%2FCoreBundle%2FResources%2Fviews%2Fthemes%2Fmaterial%2FDeveloper%2Fhowto_app.html.twig;h=497bb3085fe6add288084cb433cdeb022a9d88aa;hb=abc329453be6381bcf4d1b0dfd9f698312ed3b16;hp=2db15b165a3dc264a0199f8c6d6042882f4af8e0;hpb=6a2c524a2cee02a0e053574155f173147cd3c870;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/howto_app.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/howto_app.html.twig index 2db15b16..497bb308 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/howto_app.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Developer/howto_app.html.twig @@ -2,6 +2,11 @@ {% block title %}{% trans %}How to create my first application{% endtrans %}{% endblock %} +{% block css %} + {{ parent() }} + +{% endblock %} + {% block content %}
To create this token, you need to create a new client.
Now, create your token (replace client_id, client_secret, username and password with the good values):
-
-
+ password=yourPassw0rd
-http POST http://v2.wallabag.org/oauth/v2/token \
+
- http POST http://v2.wallabag.org/oauth/v2/token \
grant_type=password \
client_id=12_5um6nz50ceg4088c0840wwc0kgg44g00kk84og044ggkscso0k \
client_secret=3qd12zpeaxes8cwg8c0404g888co4wo8kc4gcw0occww8cgw4k \
username=yourUsername \
- password=yourPassw0rd
-
The API will return a response like this:
-
-
+}
-HTTP/1.1 200 OK
+
- HTTP/1.1 200 OK
Cache-Control: no-store, private
Connection: close
Content-Type: application/json
@@ -44,25 +43,20 @@ X-Powered-By: PHP/5.5.9-1ubuntu4.13
"refresh_token": "ODBjODU1NWUwNmUzZTBkNDQ5YWVlZTVlMjQ2Y2I0OWM2NTM1ZGM2M2Y3MDhjMTViM2U2MzYxYzRkMDk5ODRlZg",
"scope": null,
"token_type": "bearer"
-}
-
The access_token is useful to do a call to the API endpoint. For example:
-
-
+
-http GET http://v2.wallabag.org/api/entries.json \
- "Authorization:Bearer ZWFjNjA3ZWMwYWVmYzRkYTBlMmQ3NTllYmVhOGJiZDE0ZTg1NjE4MjczOTVlNzM0ZTRlMWQ0MmRlMmYwNTk5Mw"
-
-
http GET http://v2.wallabag.org/api/entries.json \
+ "Authorization:Bearer ZWFjNjA3ZWMwYWVmYzRkYTBlMmQ3NTllYmVhOGJiZDE0ZTg1NjE4MjczOTVlNzM0ZTRlMWQ0MmRlMmYwNTk5Mw"
This call will return all the entries for your user.
If you want to see all the API endpoints, you can have a look to our API documentation.
- +