How do I authenticate a CI pipeline to a cloud Android device service with an API token?
Use gmsaas and authenticate it with gmsaas auth token <token>, or set the GENYMOTION_API_TOKEN environment variable in your CI job. After that, gmsaas doctor should report Authentication OK and Android SDK OK.
See the setup in Automation Features and gmsaas Command Line Interface.
export GENYMOTION_API_TOKEN="your_token"
gmsaas doctor
If you prefer a one-time command in the pipeline:
gmsaas auth token <token>
gmsaas doctor
You still need the Android SDK platform-tools available on the CI runner, and then you can start devices and connect them to ADB with gmsaas instances start and gmsaas instances adbconnect from the same pipeline.