Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2013-2025, OVH SAS.
Copyright (c) 2013-2026, OVH SAS.
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion MIGRATION.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Migrate from legacy wrappers
############################

This guide specifically targets developers comming from the legacy wrappers
previously distributed on https://api.ovh.com/g934.first_step_with_api. It
previously distributed on https://api.eu.ovhcloud.com/g934.first_step_with_api. It
highligts the main evolutions between these 2 major version as well as some
tips to help with the migration. If you have any further questions, feel free
to drop a mail on api@ml.ovh.net (api-subscribe@ml.ovh.net to subscribe).
Expand Down
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,10 +189,10 @@ They can also be created together if your application is intended to use only yo
### OVHcloud Europe

* `$endpoint = 'ovh-eu';`
* Documentation: <https://eu.api.ovh.com/>
* Console: <https://eu.api.ovh.com/console>
* Create application credentials (generate only application credentials, your app will need to implement an authorization flow): <https://eu.api.ovh.com/createApp/>
* Create account credentials (all keys at once for your own account only): <https://eu.api.ovh.com/createToken/>
* Documentation: <https://api.eu.ovhcloud.com/>
* Console: <https://api.eu.ovhcloud.com/console>
* Create application credentials (generate only application credentials, your app will need to implement an authorization flow): <https://auth.eu.ovhcloud.com/api/createApp/>
* Create account credentials (all keys at once for your own account only): <https://auth.eu.ovhcloud.com/api/createToken/>
* Community support: api-subscribe@ml.ovh.net

### OVHcloud US
Expand All @@ -206,10 +206,10 @@ They can also be created together if your application is intended to use only yo
### OVHcloud North America / Canada

* `$endpoint = 'ovh-ca';`
* Documentation: <https://ca.api.ovh.com/>
* Console: <https://ca.api.ovh.com/console>
* Create application credentials (generate only application credentials, your app will need to implement an authorization flow): <https://ca.api.ovh.com/createApp/>
* Create account credentials (all keys at once for your own account only): <https://ca.api.ovh.com/createToken/>
* Documentation: <https://api.ca.ovhcloud.com/>
* Console: <https://api.ca.ovhcloud.com/console>
* Create application credentials (generate only application credentials, your app will need to implement an authorization flow): <https://auth.ca.ovhcloud.com/api/createApp/>
* Create account credentials (all keys at once for your own account only): <https://auth.ca.ovhcloud.com/api/createToken/>
* Community support: api-subscribe@ml.ovh.net

### So you Start Europe
Expand Down
4 changes: 2 additions & 2 deletions examples/create-Redirection/api_create_redirection.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ tar xzvf php-ovh-2.0.0-with-dependencies.tar.gz

## Create a new token

You can create a new token using this url: [https://api.ovh.com/createToken/?GET=/domain/zone/*&POST=/domain/zone/*&DELETE=/domain/zone/*](https://api.ovh.com/createToken/?GET=/domain/zone/*&POST=/domain/zone/*&DELETE=/domain/zone/*).
You can create a new token using this url: [https://auth.eu.ovhcloud.com/api/createToken/?GET=/domain/zone/*&POST=/domain/zone/*&DELETE=/domain/zone/*](https://auth.eu.ovhcloud.com/api/createToken/?GET=/domain/zone/*&POST=/domain/zone/*&DELETE=/domain/zone/*).
Keep application key, application secret and consumer key to complete the script.

Be warned, this token is only valid for this script on **/domain/zone/\*** APIs.
Expand Down Expand Up @@ -57,5 +57,5 @@ For instance, using the example values in this script, the answer would look lik

## What's more?

You can discover all domain possibilities by using API console to show all available endpoints: [https://api.ovh.com/console](https://api.ovh.com/console)
You can discover all domain possibilities by using API console to show all available endpoints: [https://api.eu.ovhcloud.com/console](https://api.eu.ovhcloud.com/console)

Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ tar xzvf php-ovh-2.0.0-with-dependencies.tar.gz
```

## Create a new token
You can create a new token using [this url](https://api.ovh.com/createToken/?GET=/hosting/web/my_domain/attachedDomain&POST=/hosting/web/my_domain/attachedDomain&GET=/hosting/web/my_domain/attachedDomain/*&PUT=/hosting/web/my_domain/attachedDomain/*&DELETE=/hosting/web/my_domain/attachedDomain/*). Keep the application key, the application secret and the consumer key to complete the script.
You can create a new token using [this url](https://auth.eu.ovhcloud.com/api/createToken/?GET=/hosting/web/my_domain/attachedDomain&POST=/hosting/web/my_domain/attachedDomain&GET=/hosting/web/my_domain/attachedDomain/*&PUT=/hosting/web/my_domain/attachedDomain/*&DELETE=/hosting/web/my_domain/attachedDomain/*). Keep the application key, the application secret and the consumer key to complete the script.

Be warned, this token is only valid for this script and for hosting called **my_domain**. Please replace **my_domain** by your web hosting reference!
If you need a more generic token, make sure to set the rights field to your needs
Expand Down Expand Up @@ -85,5 +85,5 @@ Domain detached from the web hosting

## What's next?

You can discover all hosting possibilities by using API console to show all available endpoints: [https://api.ovh.com/console](https://api.ovh.com/console)
You can discover all hosting possibilities by using API console to show all available endpoints: [https://api.eu.ovhcloud.com/console](https://api.eu.ovhcloud.com/console)

Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ tar xzvf php-ovh-2.0.0-with-dependencies.tar.gz
```

- Create a new token
You can create a new token using this url: [https://api.ovh.com/createToken/?GET=/hosting/web/my_domain&GET=/hosting/web/offerCapabilities](https://api.ovh.com/createToken/?GET=/hosting/web/my_domain&GET=/hosting/web/offerCapabilities). Keep application key, application secret and consumer key to complete the script.
You can create a new token using this url: [https://auth.eu.ovhcloud.com/api/createToken/?GET=/hosting/web/my_domain&GET=/hosting/web/offerCapabilities](https://auth.eu.ovhcloud.com/api/createToken/?GET=/hosting/web/my_domain&GET=/hosting/web/offerCapabilities). Keep application key, application secret and consumer key to complete the script.

Be warn, this token is only validated for this script and for hosting called **my_domain**. Please replace **my_domain** by your web hosting reference!
If you need a more generic token, you had to change right field.
Expand Down Expand Up @@ -113,5 +113,5 @@ Array

## What's more?

You can discover all hosting possibilities by using API console to show all available endpoints: [https://api.ovh.com/console](https://api.ovh.com/console)
You can discover all hosting possibilities by using API console to show all available endpoints: [https://api.eu.ovhcloud.com/console](https://api.eu.ovhcloud.com/console)

2 changes: 1 addition & 1 deletion scripts/release_binary.sh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ require __DIR__ . "/vendor/autoload.php";
use \Ovh\Api;

// Informations about your application
// You may create new credentials on https://api.ovh.com/createToken/index.cgi
// You may create new credentials on https://auth.eu.ovhcloud.com/api/createToken/index.cgi
$applicationKey = "your_app_key";
$applicationSecret = "your_app_secret";
$consumer_key = "your_consumer_key";
Expand Down
12 changes: 6 additions & 6 deletions src/Api.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php // phpcs:disable PSR1.Files.SideEffects.FoundWithSymbols
# Copyright (c) 2013-2025, OVH SAS.
# Copyright (c) 2013-2026, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -58,8 +58,8 @@ class Api
* @var array
*/
private $endpoints = [
'ovh-eu' => 'https://eu.api.ovh.com/1.0',
'ovh-ca' => 'https://ca.api.ovh.com/1.0',
'ovh-eu' => 'https://api.eu.ovhcloud.com/1.0',
'ovh-ca' => 'https://api.ca.ovhcloud.com/1.0',
'ovh-us' => 'https://api.us.ovhcloud.com/1.0',
'kimsufi-eu' => 'https://eu.api.kimsufi.com/1.0',
'kimsufi-ca' => 'https://ca.api.kimsufi.com/1.0',
Expand All @@ -69,8 +69,8 @@ class Api
];

private static $OAUTH2_TOKEN_URLS = [
"ovh-eu" => "https://www.ovh.com/auth/oauth2/token",
"ovh-ca" => "https://ca.ovh.com/auth/oauth2/token",
"ovh-eu" => "https://auth.eu.ovhcloud.com/oauth2/token",
"ovh-ca" => "https://auth.ca.ovhcloud.com/oauth2/token",
"ovh-us" => "https://us.ovhcloud.com/auth/oauth2/token",
];

Expand Down Expand Up @@ -128,7 +128,7 @@ class Api
*
* @param string $application_key key of your application.
* For OVH APIs, you can create a application's credentials on
* https://api.ovh.com/createApp/
* https://auth.eu.ovhcloud.com/api/createApp/
* @param string $application_secret secret of your application.
* @param string $api_endpoint name of api selected
* @param string $consumer_key If you have already a consumer key, this parameter prevent to do a
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/ApiException.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
# Copyright (c) 2013-2025, OVH SAS.
# Copyright (c) 2013-2026, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/InvalidParameterException.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
# Copyright (c) 2013-2025, OVH SAS.
# Copyright (c) 2013-2026, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/NotLoggedException.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
# Copyright (c) 2013-2025, OVH SAS.
# Copyright (c) 2013-2026, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion src/Exceptions/OAuth2FailureException.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
# Copyright (c) 2013-2025, OVH SAS.
# Copyright (c) 2013-2026, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion src/OAuth2.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
# Copyright (c) 2013-2025, OVH SAS.
# Copyright (c) 2013-2026, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion tests/ApiFunctionalTest.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?php
# Copyright (c) 2013-2025, OVH SAS.
# Copyright (c) 2013-2026, OVH SAS.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
Loading
Loading