1 {% extends "WallabagCoreBundle::layout.html.twig" %}
3 {% block title %}{% trans %}How to create my first application{% endtrans %}{% endblock %}
8 <div class="card-panel settings">
11 <p>The following commands make use of the <a href="https://github.com/jkbrzt/httpie">HTTPie library</a>. Make sure it is installed on your system before using it.</p>
12 <p>You need a token to communicate between your 3rd application and wallabag API.</p>
13 <p>To create this token, you need <a href="{{ path('create_client') }}">to create a new client</a>.</p>
14 <p>Now, create your token (replace client_id, client_secret, username and password with the good values):</p>
18 http POST http://v2.wallabag.org/oauth/v2/token \
20 client_id=12_5um6nz50ceg4088c0840wwc0kgg44g00kk84og044ggkscso0k \
21 client_secret=3qd12zpeaxes8cwg8c0404g888co4wo8kc4gcw0occww8cgw4k \
22 username=yourUsername \
27 <p>The API will return a response like this:</p>
32 Cache-Control: no-store, private
34 Content-Type: application/json
35 Date: Tue, 06 Oct 2015 18:24:03 GMT
39 X-Debug-Token-Link: /profiler/be00a1
40 X-Powered-By: PHP/5.5.9-1ubuntu4.13
42 "access_token": "ZWFjNjA3ZWMwYWVmYzRkYTBlMmQ3NTllYmVhOGJiZDE0ZTg1NjE4MjczOTVlNzM0ZTRlMWQ0MmRlMmYwNTk5Mw",
44 "refresh_token": "ODBjODU1NWUwNmUzZTBkNDQ5YWVlZTVlMjQ2Y2I0OWM2NTM1ZGM2M2Y3MDhjMTViM2U2MzYxYzRkMDk5ODRlZg",
46 "token_type": "bearer"
51 <p>The access_token is useful to do a call to the API endpoint. For example:</p>
55 http GET http://v2.wallabag.org/api/entries.json \
56 "Authorization:Bearer ZWFjNjA3ZWMwYWVmYzRkYTBlMmQ3NTllYmVhOGJiZDE0ZTg1NjE4MjczOTVlNzM0ZTRlMWQ0MmRlMmYwNTk5Mw"
60 <p>This call will return all the entries for your user.</p>
61 <p>If you want to see all the API endpoints, you can have a look <a href="{{ path('nelmio_api_doc_index') }}">to our API documentation</a>.</p>
62 <p><a class="waves-effect waves-light btn" href="{{ path('developer') }}">Back to Developer main page</a></p>