Error: 600: Unknown Error: {'status': 401, 'body': '<HTML>\n<HEAD>\n<TITLE>Token invalid - Invalid token: Token not found</TITLE>\n</HEAD>\n<BODY BGCOLOR="#FFFFFF" TEXT="#000000">\n<H1>Token invalid - Invalid token: Token not found</H1>\n<H2>Error 401</H2>\n</BODY>\n</HTML>\n', 'reason': 'Token invalid - Invalid token: Token not found'}
when I remove the OAUTHFILE=oauth.txt-admin$x from the script and use my own token, the script works fine (But slow). So suspect that there is a issue with the service accounts I am using. I checked all of the 20 accounts and they are not suspended. I suspect there is something wrong with either the ouath token, were should I start looking & what might be the fastest way to resolve?
I have copied the script I am using below.
-Dave
#!/bin/bash
filetime=$(date +'%Y%m%d')
gam_command(){
OAUTHFILE=oauth.txt-admin$x python /gam/gam.py user "$email" show forward >> $filetime\.account.forwarding.raw.data
}
IFS=,
x=1
while read email _user _org _suspended _admin _create _login ; do
email=${email//\"/}
gam_command $email $x &
### gam_command2 $email $x &
while (( $(jobs | wc -l) >= 35 )); do
sleep 0.2
jobs > /dev/null
done
x=$(($x+1))
if [ $x -gt 20 ]
then
x=1
fi
done < "$@"
wait