iTranslated by AI
How to Resolve 403 Errors in Skicka
Introduction
I wanted to use Skicka to upload data from a GitHub repository to Google Drive.
I ran into a 403 error along the way, so I'm writing down the solution here as a note.
Issue
I tried to issue a Skicka token, but it resulted in a 403 error and I couldn't proceed.
Current Status
I implemented it by referring to the following article, and I was able to proceed without issues until writing skicka.config, but after that, I got stuck due to the problem mentioned above.
There might have been some changes on the GCP side.
After filling out the file and running skicka -no-browser-auth df, an authentication URL is returned.
Accessing the specified URL should lead to the authentication screen, but a 403 error occurs, and I cannot move forward.
Cause
It seems a 403 error occurs if you haven't registered yourself as a test user (Information from Twitter).
Solution
Registering a Test User
-
Access the "OAuth consent screen" within "APIs & Services".

-
Click the add button to display the input screen, then enter your email address in the input field and register.

Verification
- After registering yourself as a test user, try running
skicka -no-browser-auth dfagain.
#skicka -no-browser-auth df
Go to the following link in your browser:
https://accounts.google.com/o/oauth2/auth?client_id=XXX.apps.googleusercontent.com...
-
Access the URL obtained above.
Unlike before, although a warning appears, it looks like you can proceed from Continue.

-
Log in according to the screen instructions.

-
Obtain the token and enter it.

Enter verification code: { token obtained }
-
Access successful!!!
Successfully retrieved Google Drive information!
Updating metadata cache: [=======================================================================] 100.00% 5m32s
Capacity 100.00 GiB
Trash 2.04 GiB 2.04%
Drive 12.26 GiB 12.26%
Gmail 262.72 MiB 0.26%
Photos 77.91 GiB 77.91%
Free space 7.53 GiB 7.53%
(100GB plan, with 7GB free...)
- Obtain token information.
# cat /root/.skicka.tokencache.json
{"ClientId":"{client_id}","access_token":"{token}","token_type":"Bearer","refresh_token":"{token}","expiry":"2022-01-22T14:23:59.9556225Z"}#
Now, all that's left is to implement using this token information.
References
Tweet mentioning that a test user is required
Discussion