Advertisement
Guest User

Untitled

a guest
Jun 9th, 2018
596
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 9.62 KB | None | 0 0
  1. Stap 1. Postman OAuth2 Token Request
  2. - Grant Type: Authorization Code
  3. - Callback URL: http://example.com/oauth2callback
  4. - Token URL: https://accounts.google.com/o/oauth2/auth
  5. - Access Token URL: https://accounts.google.com/o/oauth2/token
  6. - Client ID: *****
  7. - Client Secret: *****
  8. - Scope: email https://www.googleapis.com/auth/calendar
  9. - Client Authentication: Send as Basic Auth header
  10.  
  11. Result:
  12.  
  13. Token Name
  14. Google
  15. Access Token
  16. ya29.GlvUBZp3DxXVpGQizr692dniRLdmbQFvcHHtIzSkZO6QbsWzH-bNLOzkLZfnFRi-WVlyTWP0reasrHErPEutQQYRHFRT519RMeir1DAYvyLu4M25W9L_xMKX9AKE
  17. Token Type
  18. Bearer
  19. expires_in
  20. 3599
  21. id_token
  22. eyJhbGciOiJSUzI1NiIsImtpZCI6IjE5MjMzOTczODFkOTU3NGJiODczMjAyYTkwYzMyYjdjZWVhZWQwMjcifQ.eyJhenAiOiIzMTIyNjYyMDEwMjktbmlwbmV2cHFibzhoMDJiNzRuMjFtOXRiZ2o3cjg3dGguYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJhdWQiOiIzMTIyNjYyMDEwMjktbmlwbmV2cHFibzhoMDJiNzRuMjFtOXRiZ2o3cjg3dGguYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJzdWIiOiIxMTU3OTY3NjQ2ODE4MjM4Njk0NjUiLCJlbWFpbCI6ImRyay5hbmFzczEyQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhdF9oYXNoIjoia3FxVWNKM09HRVFzXzl0UF91OTJrUSIsImV4cCI6MTUyODQ3Nzg5OCwiaXNzIjoiYWNjb3VudHMuZ29vZ2xlLmNvbSIsImlhdCI6MTUyODQ3NDI5OH0.ShvgYCtxjd09kFFO5WjQh8pnMeoSzpdpg2DbWMpsvpFyeHrvH3qsuR6i77R8Tc64bspbnD2J53phBvEuLFcK1J9Ho6OpWzAe7js9IiRJWzf-STG6S0yfJIV4hcUy1RcOB-9tQ22dyXp1hlDXFBpwaJNE5iaVN6x_XsW44Qb6zjA66tzPFy7zWsUK2pwI1DmQyMQbNa8xm21CohsqkMaLFe67TbMpr_ae_6_h5TvlYSOLUtxLdwo7bqOhFdq_6CIaSHyDcC_83DFAc8LnH9Cvuz1AQJk6QxT81A7IqF7hk6phFfQxxw1bAMWDNV_HtOgxdaWdF1QX6xJwBpzUH37rTw
  23.  
  24. Stap 2. Agenda's ophalen
  25. - URL: https://www.googleapis.com/calendar/v3/users/me/calendarList
  26. - Auth: Bearer *****
  27.  
  28. Result:
  29. {
  30.    "kind": "calendar#calendarList",
  31.    "etag": "\"p33c9bg6rpajdm0g\"",
  32.    "nextSyncToken": "CNiVwNvKptsCEhVkcmsuYW5hc3MxMkBnbWFpbC5jb20=",
  33.    "items": [
  34.        {
  35.            "kind": "calendar#calendarListEntry",
  36.            "etag": "\"1506639216462000\"",
  37.            "id": "mhffuem5u24kf7j2l52n4q8u6led0gv0@import.calendar.google.com",
  38.            "summary": "Avans 42IN05sol",
  39.            "description": "Avans Rooster voor 42IN05sol",
  40.            "timeZone": "Europe/Amsterdam",
  41.            "summaryOverride": "Avans 42IN05SOl",
  42.            "colorId": "17",
  43.            "backgroundColor": "#9a9cff",
  44.            "foregroundColor": "#000000",
  45.            "selected": true,
  46.            "accessRole": "reader",
  47.            "defaultReminders": [],
  48.            "conferenceProperties": {
  49.                "allowedConferenceSolutionTypes": [
  50.                    "eventHangout"
  51.                ]
  52.            }
  53.        },
  54.        {
  55.            "kind": "calendar#calendarListEntry",
  56.            "etag": "\"1517013613174000\"",
  57.            "id": "91t9phohoq4mrnspk9hn7gkj2rhqfg0c@import.calendar.google.com",
  58.            "summary": "Avans 42IN08SOf",
  59.            "description": "Avans Rooster voor 42IN08SOf",
  60.            "timeZone": "Europe/Amsterdam",
  61.            "colorId": "2",
  62.            "backgroundColor": "#d06b64",
  63.            "foregroundColor": "#000000",
  64.            "selected": true,
  65.            "accessRole": "reader",
  66.            "defaultReminders": [],
  67.            "conferenceProperties": {
  68.                "allowedConferenceSolutionTypes": [
  69.                    "eventHangout"
  70.                ]
  71.            }
  72.        },
  73.        {
  74.            "kind": "calendar#calendarListEntry",
  75.            "etag": "\"1511787956033000\"",
  76.            "id": "8pn50fl4cej39glhgh1a64874vuj77eg@import.calendar.google.com",
  77.            "summary": "Avans 42IN05sol",
  78.            "description": "Avans Rooster voor 42IN05sol",
  79.            "timeZone": "Europe/Amsterdam",
  80.            "colorId": "9",
  81.            "backgroundColor": "#7bd148",
  82.            "foregroundColor": "#000000",
  83.            "accessRole": "reader",
  84.            "defaultReminders": [],
  85.            "conferenceProperties": {
  86.                "allowedConferenceSolutionTypes": [
  87.                    "eventHangout"
  88.                ]
  89.            }
  90.        },
  91.        {
  92.            "kind": "calendar#calendarListEntry",
  93.            "etag": "\"1520100225548000\"",
  94.            "id": "drk.anass12@gmail.com",
  95.            "summary": "drk.anass12@gmail.com",
  96.            "timeZone": "Europe/Amsterdam",
  97.            "colorId": "15",
  98.            "backgroundColor": "#9fc6e7",
  99.            "foregroundColor": "#000000",
  100.            "selected": true,
  101.            "accessRole": "owner",
  102.            "defaultReminders": [
  103.                {
  104.                    "method": "email",
  105.                    "minutes": 10
  106.                },
  107.                {
  108.                    "method": "popup",
  109.                    "minutes": 30
  110.                }
  111.            ],
  112.            "notificationSettings": {
  113.                "notifications": [
  114.                    {
  115.                        "type": "eventCreation",
  116.                        "method": "email"
  117.                    },
  118.                    {
  119.                        "type": "eventChange",
  120.                        "method": "email"
  121.                    },
  122.                    {
  123.                        "type": "eventCancellation",
  124.                        "method": "email"
  125.                    },
  126.                    {
  127.                        "type": "eventResponse",
  128.                        "method": "email"
  129.                    }
  130.                ]
  131.            },
  132.            "primary": true,
  133.            "conferenceProperties": {
  134.                "allowedConferenceSolutionTypes": [
  135.                    "eventHangout"
  136.                ]
  137.            }
  138.        },
  139.        {
  140.            "kind": "calendar#calendarListEntry",
  141.            "etag": "\"1523830106097000\"",
  142.            "id": "fbvc6pngn9dc9kvujhcgbuomh8hcin7f@import.calendar.google.com",
  143.            "summary": "Avans 42IN12SOd",
  144.            "description": "Avans Rooster voor 42IN12SOd",
  145.            "timeZone": "Europe/Amsterdam",
  146.            "colorId": "7",
  147.            "backgroundColor": "#42d692",
  148.            "foregroundColor": "#000000",
  149.            "selected": true,
  150.            "accessRole": "reader",
  151.            "defaultReminders": [],
  152.            "conferenceProperties": {
  153.                "allowedConferenceSolutionTypes": [
  154.                    "eventHangout"
  155.                ]
  156.            }
  157.        },
  158.        {
  159.            "kind": "calendar#calendarListEntry",
  160.            "etag": "\"1517013815429000\"",
  161.            "id": "pv85j2i745brjtgojittrmjb3d7b91ar@import.calendar.google.com",
  162.            "summary": "Avans 42IN11SOd",
  163.            "description": "Avans Rooster voor 42IN11SOd",
  164.            "timeZone": "Europe/Amsterdam",
  165.            "colorId": "23",
  166.            "backgroundColor": "#cd74e6",
  167.            "foregroundColor": "#000000",
  168.            "selected": true,
  169.            "accessRole": "reader",
  170.            "defaultReminders": [],
  171.            "conferenceProperties": {
  172.                "allowedConferenceSolutionTypes": [
  173.                    "eventHangout"
  174.                ]
  175.            }
  176.        },
  177.        {
  178.            "kind": "calendar#calendarListEntry",
  179.            "etag": "\"1511626812480000\"",
  180.            "id": "ot4ae8r2g4m1gmv346fg6ouarkbf4gmu@import.calendar.google.com",
  181.            "summary": "Avans 42IN06SOl",
  182.            "description": "Avans Rooster voor 42IN06SOl",
  183.            "timeZone": "Europe/Amsterdam",
  184.            "colorId": "18",
  185.            "backgroundColor": "#b99aff",
  186.            "foregroundColor": "#000000",
  187.            "selected": true,
  188.            "accessRole": "reader",
  189.            "defaultReminders": [],
  190.            "conferenceProperties": {
  191.                "allowedConferenceSolutionTypes": [
  192.                    "eventHangout"
  193.                ]
  194.            }
  195.        },
  196.        {
  197.            "kind": "calendar#calendarListEntry",
  198.            "etag": "\"1520100224639000\"",
  199.            "id": "#contacts@group.v.calendar.google.com",
  200.            "summary": "Contacts",
  201.            "timeZone": "Europe/Amsterdam",
  202.            "summaryOverride": "Contacts",
  203.            "colorId": "17",
  204.            "backgroundColor": "#9a9cff",
  205.            "foregroundColor": "#000000",
  206.            "accessRole": "reader",
  207.            "defaultReminders": [],
  208.            "conferenceProperties": {
  209.                "allowedConferenceSolutionTypes": [
  210.                    "eventHangout"
  211.                ]
  212.            }
  213.        },
  214.        {
  215.            "kind": "calendar#calendarListEntry",
  216.            "etag": "\"1506639139917000\"",
  217.            "id": "nl.dutch#holiday@group.v.calendar.google.com",
  218.            "summary": "Feestdagen in Nederland",
  219.            "timeZone": "Europe/Amsterdam",
  220.            "summaryOverride": "Feestdagen in Nederland",
  221.            "colorId": "7",
  222.            "backgroundColor": "#42d692",
  223.            "foregroundColor": "#000000",
  224.            "selected": true,
  225.            "accessRole": "reader",
  226.            "defaultReminders": [],
  227.            "conferenceProperties": {
  228.                "allowedConferenceSolutionTypes": [
  229.                    "eventHangout"
  230.                ]
  231.            }
  232.        }
  233.    ]
  234. }
  235.  
  236. Stap 3. Agenda events ophalen met agenda id
  237. URL: https://www.googleapis.com/calendar/v3/calendars/drk.anass12@gmail.com/events
  238. Auth: Bearer ****
  239.  
  240. Result:
  241. {
  242.    "kind": "calendar#events",
  243.    "etag": "\"p33c9bg6rpajdm0g\"",
  244.    "summary": "drk.anass12@gmail.com",
  245.    "updated": "2018-05-27T19:04:25.527Z",
  246.    "timeZone": "Europe/Amsterdam",
  247.    "accessRole": "owner",
  248.    "defaultReminders": [
  249.        {
  250.            "method": "email",
  251.            "minutes": 10
  252.        },
  253.        {
  254.            "method": "popup",
  255.            "minutes": 30
  256.        }
  257.    ],
  258.    "nextSyncToken": "CNiVwNvKptsCENiVwNvKptsCGAU=",
  259.    "items": ****
  260. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement