質問編集履歴

1

2022/01/14 04:59

投稿

xekdwpsg
xekdwpsg

スコア20

test CHANGED
@@ -1 +1 @@
1
- Gmail APIのメール送信で403エラーが出てしまう
1
+ Excepteur sint occaecat cupidatat non proident
test CHANGED
@@ -1,57 +1 @@
1
- 以下の記事を参考にして、Gmail APIとJavaScriptでメール送信をしたいと思っています。
2
-
3
- http://tech.respect-pal.jp/gmailapi-send-mail/
4
-
5
-
6
-
7
- プログラムの一番最後のこの部分で、
8
-
9
- ```javascript
10
-
11
- gapi.client.gmail.users.messages.send({
12
-
13
- 'userId': 'me',
14
-
15
- 'resource': {
16
-
17
- 'raw': raw
18
-
19
- }
20
-
21
- }).execute(function() {
22
-
23
- // 送信後の処理
24
-
25
- });
26
-
27
- ```
28
-
29
-
30
-
31
- このようなエラーが出てしまいます。
32
-
33
- ```
34
-
35
- POST https://content.googleapis.com/gmail/v1/users/me/messages/send?alt=json 403
36
-
37
- ```
38
-
39
-
40
-
41
- 以下のページの解答欄に、上記サイトのプログラムを1つにまとめた完成版が掲載されていて、こちらも試してみましたが、全く同じ403エラーが出ます。
42
-
43
- https://teratail.com/questions/37542
44
-
45
-
46
-
47
- 以下のページを参考にして、スコープを `https://www.googleapis.com/auth/gmail.send` からフルアクセスの `https://mail.google.com/` に変えてみましたが、それでも同じ403エラーが出ます。
48
-
49
- https://stackoverflow.com/questions/32143126/how-do-i-get-around-httperror-403-insufficient-permission-gmail-api-python
50
-
51
-
52
-
53
- Googleアカウントのセキュリティの「アカウントにアクセスできるサードパーティ アプリ」ではアクセス権が付与されています。
54
-
55
-
56
-
57
- これ以上どうしようもなくなり、質問させて頂きました。
1
+ Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.