Access and Authentication
This section provides a detailed guide on how to access Fotor OpenAPI and authenticate your requests to ensure secure usage of our API services.API Endpoint#
Authentication#
Fotor OpenAPI uses Bearer Token authentication. You must include your API key in the Authorization
header of every request.Authorization: Bearer <your_api_key>
Here, <your_api_key>
is the API key you obtained from the Fotor Developer Platform.How to Obtain an API Key#
3.
Navigate to the API Key Management page to create your API key.
4.
Keep your API key secure and avoid sharing it.
In addition to the Authorization
header, you must specify the Content-Type
header as application/json
, indicating that the request body is in JSON format.Content-Type: application/json
Example Request (Using cURL)#
Below is an example of sending a request using cURL, demonstrating how to include the Authorization
and Content-Type
headers:Replace <your_api_key>
with your actual API key.Error Handling#
If your request is missing or contains an invalid Authorization
token, the API will return a 401 Unauthorized
error. You should verify your API key and ensure it is correctly included in the request header.Other common HTTP status codes include:400 Bad Request: The request parameters are incomplete or incorrectly formatted.
429 Too Many Requests: Excessive request rate.
500 Internal Server Error: A server-side error occurred.
The API also returns a JSON response body with code
and msg
fields to provide more detailed error information:Summary#
To successfully access Fotor OpenAPI, you need to:1.
Use the correct API endpoint.
2.
Include a valid API key in the Authorization
header.
3.
Set the Content-Type
header to application/json
.
By following these steps, you can securely and effectively utilize the features of Fotor OpenAPI.If you encounter any issues during access or authentication, please contact our technical support team promptly. Modified at 2025-01-22 03:35:23