Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Stap 1. Postman OAuth2 Token Request
- - Grant Type: Authorization Code
- - Callback URL: http://example.com/oauth2callback
- - Token URL: https://accounts.google.com/o/oauth2/auth
- - Access Token URL: https://accounts.google.com/o/oauth2/token
- - Client ID: *****
- - Client Secret: *****
- - Scope: email https://www.googleapis.com/auth/calendar
- - Client Authentication: Send as Basic Auth header
- Result:
- Token Name
- Google
- Access Token
- ya29.GlvUBZp3DxXVpGQizr692dniRLdmbQFvcHHtIzSkZO6QbsWzH-bNLOzkLZfnFRi-WVlyTWP0reasrHErPEutQQYRHFRT519RMeir1DAYvyLu4M25W9L_xMKX9AKE
- Token Type
- Bearer
- expires_in
- 3599
- id_token
- eyJhbGciOiJSUzI1NiIsImtpZCI6IjE5MjMzOTczODFkOTU3NGJiODczMjAyYTkwYzMyYjdjZWVhZWQwMjcifQ.eyJhenAiOiIzMTIyNjYyMDEwMjktbmlwbmV2cHFibzhoMDJiNzRuMjFtOXRiZ2o3cjg3dGguYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJhdWQiOiIzMTIyNjYyMDEwMjktbmlwbmV2cHFibzhoMDJiNzRuMjFtOXRiZ2o3cjg3dGguYXBwcy5nb29nbGV1c2VyY29udGVudC5jb20iLCJzdWIiOiIxMTU3OTY3NjQ2ODE4MjM4Njk0NjUiLCJlbWFpbCI6ImRyay5hbmFzczEyQGdtYWlsLmNvbSIsImVtYWlsX3ZlcmlmaWVkIjp0cnVlLCJhdF9oYXNoIjoia3FxVWNKM09HRVFzXzl0UF91OTJrUSIsImV4cCI6MTUyODQ3Nzg5OCwiaXNzIjoiYWNjb3VudHMuZ29vZ2xlLmNvbSIsImlhdCI6MTUyODQ3NDI5OH0.ShvgYCtxjd09kFFO5WjQh8pnMeoSzpdpg2DbWMpsvpFyeHrvH3qsuR6i77R8Tc64bspbnD2J53phBvEuLFcK1J9Ho6OpWzAe7js9IiRJWzf-STG6S0yfJIV4hcUy1RcOB-9tQ22dyXp1hlDXFBpwaJNE5iaVN6x_XsW44Qb6zjA66tzPFy7zWsUK2pwI1DmQyMQbNa8xm21CohsqkMaLFe67TbMpr_ae_6_h5TvlYSOLUtxLdwo7bqOhFdq_6CIaSHyDcC_83DFAc8LnH9Cvuz1AQJk6QxT81A7IqF7hk6phFfQxxw1bAMWDNV_HtOgxdaWdF1QX6xJwBpzUH37rTw
- Stap 2. Agenda's ophalen
- - URL: https://www.googleapis.com/calendar/v3/users/me/calendarList
- - Auth: Bearer *****
- Result:
- {
- "kind": "calendar#calendarList",
- "etag": "\"p33c9bg6rpajdm0g\"",
- "nextSyncToken": "CNiVwNvKptsCEhVkcmsuYW5hc3MxMkBnbWFpbC5jb20=",
- "items": [
- {
- "kind": "calendar#calendarListEntry",
- "etag": "\"1506639216462000\"",
- "id": "mhffuem5u24kf7j2l52n4q8u6led0gv0@import.calendar.google.com",
- "summary": "Avans 42IN05sol",
- "description": "Avans Rooster voor 42IN05sol",
- "timeZone": "Europe/Amsterdam",
- "summaryOverride": "Avans 42IN05SOl",
- "colorId": "17",
- "backgroundColor": "#9a9cff",
- "foregroundColor": "#000000",
- "selected": true,
- "accessRole": "reader",
- "defaultReminders": [],
- "conferenceProperties": {
- "allowedConferenceSolutionTypes": [
- "eventHangout"
- ]
- }
- },
- {
- "kind": "calendar#calendarListEntry",
- "etag": "\"1517013613174000\"",
- "id": "91t9phohoq4mrnspk9hn7gkj2rhqfg0c@import.calendar.google.com",
- "summary": "Avans 42IN08SOf",
- "description": "Avans Rooster voor 42IN08SOf",
- "timeZone": "Europe/Amsterdam",
- "colorId": "2",
- "backgroundColor": "#d06b64",
- "foregroundColor": "#000000",
- "selected": true,
- "accessRole": "reader",
- "defaultReminders": [],
- "conferenceProperties": {
- "allowedConferenceSolutionTypes": [
- "eventHangout"
- ]
- }
- },
- {
- "kind": "calendar#calendarListEntry",
- "etag": "\"1511787956033000\"",
- "id": "8pn50fl4cej39glhgh1a64874vuj77eg@import.calendar.google.com",
- "summary": "Avans 42IN05sol",
- "description": "Avans Rooster voor 42IN05sol",
- "timeZone": "Europe/Amsterdam",
- "colorId": "9",
- "backgroundColor": "#7bd148",
- "foregroundColor": "#000000",
- "accessRole": "reader",
- "defaultReminders": [],
- "conferenceProperties": {
- "allowedConferenceSolutionTypes": [
- "eventHangout"
- ]
- }
- },
- {
- "kind": "calendar#calendarListEntry",
- "etag": "\"1520100225548000\"",
- "id": "drk.anass12@gmail.com",
- "summary": "drk.anass12@gmail.com",
- "timeZone": "Europe/Amsterdam",
- "colorId": "15",
- "backgroundColor": "#9fc6e7",
- "foregroundColor": "#000000",
- "selected": true,
- "accessRole": "owner",
- "defaultReminders": [
- {
- "method": "email",
- "minutes": 10
- },
- {
- "method": "popup",
- "minutes": 30
- }
- ],
- "notificationSettings": {
- "notifications": [
- {
- "type": "eventCreation",
- "method": "email"
- },
- {
- "type": "eventChange",
- "method": "email"
- },
- {
- "type": "eventCancellation",
- "method": "email"
- },
- {
- "type": "eventResponse",
- "method": "email"
- }
- ]
- },
- "primary": true,
- "conferenceProperties": {
- "allowedConferenceSolutionTypes": [
- "eventHangout"
- ]
- }
- },
- {
- "kind": "calendar#calendarListEntry",
- "etag": "\"1523830106097000\"",
- "id": "fbvc6pngn9dc9kvujhcgbuomh8hcin7f@import.calendar.google.com",
- "summary": "Avans 42IN12SOd",
- "description": "Avans Rooster voor 42IN12SOd",
- "timeZone": "Europe/Amsterdam",
- "colorId": "7",
- "backgroundColor": "#42d692",
- "foregroundColor": "#000000",
- "selected": true,
- "accessRole": "reader",
- "defaultReminders": [],
- "conferenceProperties": {
- "allowedConferenceSolutionTypes": [
- "eventHangout"
- ]
- }
- },
- {
- "kind": "calendar#calendarListEntry",
- "etag": "\"1517013815429000\"",
- "id": "pv85j2i745brjtgojittrmjb3d7b91ar@import.calendar.google.com",
- "summary": "Avans 42IN11SOd",
- "description": "Avans Rooster voor 42IN11SOd",
- "timeZone": "Europe/Amsterdam",
- "colorId": "23",
- "backgroundColor": "#cd74e6",
- "foregroundColor": "#000000",
- "selected": true,
- "accessRole": "reader",
- "defaultReminders": [],
- "conferenceProperties": {
- "allowedConferenceSolutionTypes": [
- "eventHangout"
- ]
- }
- },
- {
- "kind": "calendar#calendarListEntry",
- "etag": "\"1511626812480000\"",
- "id": "ot4ae8r2g4m1gmv346fg6ouarkbf4gmu@import.calendar.google.com",
- "summary": "Avans 42IN06SOl",
- "description": "Avans Rooster voor 42IN06SOl",
- "timeZone": "Europe/Amsterdam",
- "colorId": "18",
- "backgroundColor": "#b99aff",
- "foregroundColor": "#000000",
- "selected": true,
- "accessRole": "reader",
- "defaultReminders": [],
- "conferenceProperties": {
- "allowedConferenceSolutionTypes": [
- "eventHangout"
- ]
- }
- },
- {
- "kind": "calendar#calendarListEntry",
- "etag": "\"1520100224639000\"",
- "id": "#contacts@group.v.calendar.google.com",
- "summary": "Contacts",
- "timeZone": "Europe/Amsterdam",
- "summaryOverride": "Contacts",
- "colorId": "17",
- "backgroundColor": "#9a9cff",
- "foregroundColor": "#000000",
- "accessRole": "reader",
- "defaultReminders": [],
- "conferenceProperties": {
- "allowedConferenceSolutionTypes": [
- "eventHangout"
- ]
- }
- },
- {
- "kind": "calendar#calendarListEntry",
- "etag": "\"1506639139917000\"",
- "id": "nl.dutch#holiday@group.v.calendar.google.com",
- "summary": "Feestdagen in Nederland",
- "timeZone": "Europe/Amsterdam",
- "summaryOverride": "Feestdagen in Nederland",
- "colorId": "7",
- "backgroundColor": "#42d692",
- "foregroundColor": "#000000",
- "selected": true,
- "accessRole": "reader",
- "defaultReminders": [],
- "conferenceProperties": {
- "allowedConferenceSolutionTypes": [
- "eventHangout"
- ]
- }
- }
- ]
- }
- Stap 3. Agenda events ophalen met agenda id
- URL: https://www.googleapis.com/calendar/v3/calendars/drk.anass12@gmail.com/events
- Auth: Bearer ****
- Result:
- {
- "kind": "calendar#events",
- "etag": "\"p33c9bg6rpajdm0g\"",
- "summary": "drk.anass12@gmail.com",
- "updated": "2018-05-27T19:04:25.527Z",
- "timeZone": "Europe/Amsterdam",
- "accessRole": "owner",
- "defaultReminders": [
- {
- "method": "email",
- "minutes": 10
- },
- {
- "method": "popup",
- "minutes": 30
- }
- ],
- "nextSyncToken": "CNiVwNvKptsCENiVwNvKptsCGAU=",
- "items": ****
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement