Initiate OAuth flow for Google Earth Engine authentication.
Authentication: JWT token required Authorization: Any authenticated user
Prerequisites:
- Server must have Google OAuth client credentials configured
- Environment variables GOOGLE_OAUTH_CLIENT_ID and GOOGLE_OAUTH_CLIENT_SECRET required
Response Schema:
{
"data": {
"auth_url": "https://accounts.google.com/o/oauth2/auth?...",
"state": "random-state-string-for-csrf-protection"
}
}
Response Fields:
- auth_url: URL to redirect user to for Google OAuth authorization
- state: CSRF protection token to include in callback
OAuth Flow Steps:
- Call this endpoint to get authorization URL
- Redirect user to the auth_url
- User authorizes your application in Google
- User is redirected back with authorization code
- Call /user/me/gee-oauth/callback with the code and state
Error Responses:
- 401 Unauthorized: JWT token required or invalid
- 500 Internal Server Error: OAuth not configured or server error
post/api/v1/user/me/gee-oauth/initiate
Request
- Base URLhttps://api.trends.earth/api/v1
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Request body
object required
Response
Success
object required
Changes
No recorded changes to this operation across all 6 revisions of this API.