Authentication

We recommend that you always use one of our UGC SDKs to bypass making graphql requests.

If you are invoking our graphql api from your codebase, make sure that your API key is set in the Authorization header.

import requests

url = 'https://api.move.ai/ugc/graphql'
api_key = '<API_KEY>'  # Replace with your API key

headers = {
    'Content-Type': 'application/json',
    'Authorization': api_key
}

query = '''
{
  dummyQuery {
    dummyField
  }
}
'''

response = requests.post(url, json={'query': query}, headers=headers)

if response.status_code == 200:
    data = response.json()
    print(data)
else:
    print('Request failed with status code:', response.status_code)
curl -X POST \
 -H "Content-Type: application/json" \
 -H "Authorization: <API_KEY>" \
 -d '{
      "query": "
        {
          dummyQuery {
            dummyField
          }
        }"
    }' \
 https://api.move.ai/ugc/graphql
const axios = require('axios');

const url = 'https://api.move.ai/ugc/graphql';
const apiKey = '<API_KEY>';  // Replace with your API key

const headers = {
  'Content-Type': 'application/json',
  'Authorization': apiKey
};

const query = `
{
  dummyQuery {
    dummyField
  }
}
`;

axios.post(url, { query: query }, { headers: headers })
  .then(response => console.log(response.data))
  .catch(error => console.error('Request failed:', error));